[Ffmpeg-devel-irc] ffmpeg.log.20130301
burek
burek021 at gmail.com
Sat Mar 2 02:05:01 CET 2013
[00:38] <evil_core> should I deinterlace when converting frpm mpeg2/DivX to h264, or leave material interlaced?
[00:42] <PaulWay> I'd tend to deinterlace myself, but you still wear a quality loss either way.
[00:45] <number898989> Is it possible to send -f segment output to stdout instead of to the file system?
[00:49] <evil_core> PaulWay: could you give me a command for best-quality then?
[00:50] <evil_core> ffmpeg -i "$iFile" -c:v libx264 -preset "$preset" -c:a copy "$oFile"
[00:52] <evil_core> http://ffmpeg.org/pipermail/ffmpeg-user/2011-May/000800.html
[00:54] <evil_core> I was reading that thread, and there are so many different ways. To get best results I must anaylze if its BFF or TFF, set custom res/framerate, etc. Cannot It all be automated by ffmpeg somehow?
[01:06] <PaulWay> evil_core: Well, if you're dealing with interlaced, you've already basically lost half your pixels and half your frames.
[01:06] <PaulWay> So the answer is to not record interlaced.
[01:06] <PaulWay> If you want to deinterlace, there's probably a filter in ffmpeg somewhere for that.
[01:07] <PaulWay> I'm relatively inexperienced in the ways of ffmpeg :-)
[01:07] <PaulWay> deinterlacing sounds easy but isn't.
[01:08] <PaulWay> Basically because you've already thrown away all that information.
[01:09] <PaulWay> If you're going to end up displaying on TVs, btw, you might as well keep the interlacing.
[01:10] <PaulWay> evil_core: -vf yadif is probably what you need, I'd guess.
[07:22] <kms_> i have a last version from git but i have a problem when i try stream webm with gstreamer. FFserver give me error "Codec for stream 0 does not use global headers but container format requires global headers"
[07:23] <kms_> ssory with ffserver
[07:23] <kms_> exactly
[07:27] <kms_> AVOptionVideo flags +global_header may be fix them
[07:31] <kms_> and question number two: can i send encoded with ffmpeg data to feed and stream it with ffserver without reencode?
[08:23] <evil_core> So most videos I want to deinterlace are VHS rips saved as Progressive, but evidently not deinterlaced before. So -vf ydaif w/o additional parameters is best option for that?
[08:25] <evil_core> yadif*
[09:51] <jeje> Hi to all
[09:52] <jeje> When I receive H264 RTP packet from an IP camera to format a AVPacket to send to FFMPEG, is it necessary to remove the padding bytes from the Payload of the RTP packet before sending it to FFMPEG?
[09:54] <durandal_1707> did you tried it?
[10:23] <jeje> yes and it seems I need to remove them
[10:35] <jeje> I have another question (I post here yesterday but no answer)
[10:37] <jeje> When I send my "formatted" H264 NAL units packet to FFMPEG libraries to decode, I always add SPS and PPS on each keyframe I receive. Do I need to make some parameters setting in the AVCodecContext depending on the SPS and PPS parameters?
[10:38] <jeje> Because I only use default parameters (setting by avcodec_alloc_context3 and avcodec_open2)
[10:39] <jeje> but in documentation of FFMPEG, I can see for AVCodecContext:ticks_per_frame Most notably, H.264 and MPEG-2 specify time_base as half of frame duration if no telecine is used ...
[10:39] <jeje> Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
[10:39] <jeje> So if i'm right, I need to set this value to 2 (because decompressing H264)
[10:40] <jeje> If someone can confirm me this
[10:40] <tremby> i have a bunch of anamorphic videos and i need to get one frame out of each to use as a poster image. but the jpeg output is giving something in the wrong aspect ratio. what do i need to do to get it to first stretch the image?
[10:41] <durandal_1707> setsar/setdar filters
[10:42] <tremby> durandal_1707: i'm already using one of those to stretch the video to be the right ratio for my video outputs -- the input doesn't realize it's supposed to be anamorphic
[10:45] <durandal_1707> if inputs are incorrectly recognised than it may be bug, what container/codec ?
[10:46] <tremby> vob, fresh from DVD. it displays wrongly on a DVD player too. it's a crappy DVD
[10:51] <durandal_1707> so it is already streched or?
[10:53] <tremby> depends what you mean by stretched. the original looks wrong when i play it with mplayer -- it's too tall. i have ffmpeg doing setdar=16:9 and the video transcodes then come out right, but the jpeg does not
[10:55] <durandal_1707> shouldn't you use setsar instead?
[10:56] <tremby> i wasn't entirely clear on what they do from the manpage
[10:59] <durandal_1707> manpage?
[11:01] <tremby> the ffmpeg manual page
[11:13] <jeje> noone can confirm me please...
[11:33] <kms_> there is some software for motion detection working with ffmpeg?
[11:36] <durandal_1707> motion detection for what?
[11:37] <Fjorgynn> webcams?
[11:37] <kms_> yes
[11:40] <kms_> for recording movements in a webm and simultaneous permanent broadcasting in webm
[11:48] <kms_> i can use software named "motion" but it can't read sream from ffserver and write stream to hdd in webm
[11:51] <evil_core> ffmpeg didn't saved aspec-ratio or something. It were 4:3, and now mplayer does something like that: VO: [xv] 640x480 => 640x512 Planar YV12 [zoom]
[11:51] <evil_core> I have 4:3 screen, an now black bars appears :/
[11:52] <relaxed> The frame may be 4/3 but the pixels (sar) aren't 1/1
[11:53] <evil_core> relaxed: anyway orig. avi plays fine, when .mkv from ffmpeg doesnt
[11:56] <relaxed> So when you encode the avi to mkv with ffmpeg the playback aspect ratio changes?
[11:56] <evil_core> when opemning it with mplayer
[11:57] <evil_core> opening*
[11:58] <evil_core> relaxed: script I am using to convert movie?
[11:58] <relaxed> Well, just the ffmpeg command and output would be great.
[12:01] <evil_core> http://carme.pld-linux.org/~evil/varia/2x264
[12:02] <evil_core> its the script, nothing magivc
[12:03] <evil_core> but I would be happy with args that would save as any metadata, subtitles, audio, etc as they can
[12:06] <relaxed> $extra_args needs to before the output
[12:06] <relaxed> be before*
[12:07] <evil_core> nvm, never used it anyway, and added it after
[12:08] <relaxed> that command shouldn
[12:08] <relaxed> 't change the DAR or SAR
[12:09] <relaxed> Do as fflogger commands if you want help.
[12:12] <evil_core> ffmpeg is still running ad hogging CPU, for now can paste some lines from term history
[12:12] <evil_core> Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x480 [SAR 1:1 DAR 4:3], SAR 15:16 DAR 5:4, 25 fps, 25 tbr, 25 tbn, 30k tbc
[12:12] <evil_core> its for inpu
[12:13] <kms_> t
[12:13] <evil_core> Stream #0:0: Video: h264, yuv420p, 640x480 [SAR 15:16 DAR 5:4], q=-1--1, 1k tbn, 25 tbc
[12:13] <evil_core> so DAR and SAR is changed by ffmpeg
[12:14] <evil_core> And I found '[libx264 @ 0x24ed660] using SAR=15/16' between those lines, it means bug in libx264?
[12:15] <durandal_1707> nope
[12:21] <evil_core> so the problem is that SAR metadata is not copied to MKV container
[12:23] <evil_core> I don't get it anyway
[12:23] <relaxed> the problem is we have no idea what is going on because you still haven't pasted your command and all output somewhere!
[12:24] <relaxed> don't waste anymore keystrokes until you do this.
[12:26] <relaxed> -filter:v setdar=4:3,setsar=1:1 will probably get you what you want.
[12:28] <evil_core> fflogger isn't soemthing for windows?
[12:28] <relaxed> it's our pet bot
[12:29] <durandal_1707> fflogger: !help
[12:29] <evil_core> fflogger: !help
[12:33] <evil_core> $ 2x264 1.avi 1.mkv ultrafast > log.txt 2>&1 will be enough?
[12:47] <relaxed> 2>log.txt
[12:48] <evil_core> http://paste.fedoraproject.org/4048
[12:48] <evil_core> Its from previous, but its still encoding
[12:48] <evil_core> not only error (second) stream
[12:51] <relaxed> evil_core: Hmm, that is odd. There's no reason it should change the dar/sar. It may be a ffmpeg bug that's already been fixed.
[12:53] <relaxed> You should compile a recent version and see if the problem persists.
[12:53] <evil_core> but both got equal resolution, isn't that just metadata problem?
[12:54] <relaxed> evil_core: do you have a 64bit system?
[12:55] <evil_core> relaxed: yes
[12:56] <relaxed> evil_core: ok, then try my recent static build and see if it still happens. http://goo.gl/DPrRY
[12:58] <evil_core> relaxed: thx, will check that after come back, have to go outside of firewall
[13:18] <MessedUpHare> Hi All, I'm trying to apply a filter to a specific audio stream and I'm struggling to find the flag I need
[13:19] <MessedUpHare> for instance - I have an asset which is: #0: Video #1 Stereo Audio #2 Stereo Audio #3 Stereo Audio and I would like to apply an audio filter to only Stream number 3
[13:40] <Wihl-w> I'd really appreciate if someone could help me out a bit
[13:40] <Wihl-w> I'd like to create a video using 1 wav file and 1 image file, with the image being displayed for the entire duration of the wav file
[13:42] <Wihl-w> I'm feeling a little bit lost, I'm guessing you'd need to do -loop 1 or similar but that just means the video keeps going forever it would seem :) So I guess I'd need to find out the length of the audio somehow and make that the endpoint?
[13:42] <sacarasc> -shortest I think you're looking for.
[13:47] <Wihl-w> sacarasc: alright, what does that do?
[13:48] <sacarasc> It makes the output only as long as the shortest input stream.
[13:48] <Wihl-w> would that not be the image?
[13:48] <sacarasc> No, because you're looping it.
[13:49] <Wihl-w> oh, dur, right
[14:19] <jarno> Hi all, using libav* and video4linux2, how can you query for supported parameters, such as framerate, videosize etc???
[14:21] <jarno> ...anyone?
[14:21] <ubitux> look at lavd/v4l2.c
[14:21] <ubitux> how it is used to list stuff maybe
[14:24] <jarno> using av_dict_set(&d, "list_formats","all",0) I can print the information, but it feels kind of a flimpsy
[14:24] <jarno> ...I mean, there must be some "real" way of doing it... :)
[14:25] <durandal_1707> that is only real way of doing it
[14:28] <jarno> ...you're sure?
[14:28] <jarno> ...I guess that then I have to live with it.... :)
[14:32] <jarno> ...with av_dict_set(&d, "list_formats","all",0) I get the formats (i.e. video_size), but not the supported frame rates....
[14:47] <durandal_1707> if v4l2 supports that it can be added to code
[15:49] <Wihl-w> sacarasc: hm, maybe i'm doing it wrong but -shortest doesn't actually seem to stop the video when the audio stops
[15:53] <Wihl-w> http://pastebin.com/5Q6fxCtC
[15:53] <Wihl-w> maybe it's something obvious
[15:53] <Wihl-w> the audio file is 30 seconds
[15:59] <sacarasc> Maybe move -shortest to after the last -i
[16:00] <hughmanwho> Anyone here have experience with 'av_read_frame'?
[16:22] <Catoptromancy> Is little or big endian not important?
[16:23] <Catoptromancy> when importing .raw
[16:23] <Catoptromancy> i have no idea how this affects music
[16:23] <Catoptromancy> and sometimes the dialog defaults to big, its usually little
[16:25] <Catoptromancy> hmm
[16:26] <Wihl-w> sacarasc: I love you
[16:27] <Catoptromancy> ill rip this cd .raw with little endian
[16:27] <Catoptromancy> I think endianess deals with raw audio
[16:27] <Catoptromancy> once its a flac, it doesnt matter
[16:29] <Catoptromancy> i know what it is
[16:29] Action: Catoptromancy reads anyway
[16:30] <durandal_1707> it is important in sense if you pick wrong one you will get hardly listenable noise
[16:30] <Catoptromancy> heh
[16:30] <Catoptromancy> I think its just hardware specific
[16:30] <Catoptromancy> if it sounds like junk, use the other
[16:30] <jeje> I reask once my question about FFMPEG and H264. When I send my "formatted" H264 NAL units packet to FFMPEG libraries to decode, I always add SPS and PPS on each keyframe I receive. Do I need to make some parameters setting in the AVCodecContext depending on the SPS and PPS parameters?
[16:30] <jeje> Because I only use default parameters (setting by avcodec_alloc_context3 and avcodec_open2)
[16:30] <jeje> but in documentation of FFMPEG, I can see for AVCodecContext:ticks_per_frame Most notably, H.264 and MPEG-2 specify time_base as half of frame duration if no telecine is used ...
[16:30] <jeje> Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
[16:30] <jeje> So if i'm right, I need to set this value to 2 (because decompressing H264)
[16:30] <jeje> If someone can confirm me this
[16:36] <durandal_1707> jeje: isn't default set to 0 and changed with h264 to 2?
[16:38] <jeje> durandal_17074: you're right for this part
[16:40] <jeje> Ther is also the bits_per_coded_sample of AVCodecContext. The documentation tell set by user. Do I really need to set it?
[16:45] <durandal_1707> jeje: for h264 it is not used
[16:46] <Wihl-w> man, trying to figure this stuff out makes me feel really dumb
[16:47] <jeje> durandal_1707: Thank for the answer. Just some other part I'm not very sure... sorry. error_concealment, err_recognition and workaround_bugs. I never knnow what are the good values for these parts of AVCodecContext.
[16:47] <durandal_1707> err_recognition tells how to react on errors in bitstream
[16:48] <durandal_1707> error_concealment tells what to do with frame (audio/video) that have errors in decoding
[16:48] <durandal_1707> workaround stuff is for workaround of broken encoders
[16:49] <jeje> and to avoid crash in FFMPEG during decompression if some error in the video h264 bitstream happens? what are the greatter values?
[16:50] <durandal_1707> jeje: such variables should not make lavc crash less/more if it happens it is bug
[16:50] <jeje> for the moment I set error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK; err_recognition = AV_EF_CAREFUL; and workaround_bugs = FF_BUG_AUTODETECT;
[16:50] <durandal_1707> eg code should never crash
[16:51] <jeje> sorry I want to say: the more permissive during decompression..
[16:52] <durandal_1707> and most of such options are relevant for mpeg4 only
[16:52] <durandal_1707> because real concealement for h264 is AFAIK missing
[16:52] <jeje> ok ... so for H264 I just have to use avcodec_alloc_context3
[16:53] <jeje> and setting with and height, that's enought...
[16:54] <durandal_1707> h264 have some different paths if you set AV_EF_EXPLODE only
[16:55] <jeje> sorry I never see this AV_EF_EXPLODE
[16:56] <jeje> can you explain me please
[16:56] <durandal_1707> it is in header
[16:57] <durandal_1707> and means: aborts decoding on minor error detection
[16:58] <jeje> when you saiy: aborts decoding .. it will be abort still no another frame arriving?
[16:59] <durandal_1707> no, decoding should continue
[17:00] <jeje> ok it will be great ...How can I activate it? Is it a flag of AVCodecContext? or need some av_set_opt?
[17:01] <durandal_1707> it is err_recognition flag
[17:01] <jeje> ok thanks.
[17:02] <durandal_1707> thought i really doubt it is gonna be useful.....
[17:02] <jeje> ok but I can try. If I don't see difference, I let my avcodec_alloc_context3 set the default values
[17:14] <kms_> help me wit ffserver
[17:14] <kms_> my config http://pastebin.com/yDbLaTJw
[17:15] <kms_> but output framerete is not 1! and cpu loaded about 100%
[17:15] <kms_> how i can decrease framerate?
[17:17] <kms_> framerate in output = webcam framerate (about 25-30 fps)
[18:32] <kms_> can i raw alrady compressed mjpeg stream from my webcam?
[18:33] <durandal_1707> raw?
[18:33] <kms_> grab
[18:33] <kms_> poor english ssory
[18:34] <durandal_1707> it should be possible....
[18:34] <kms_> save mjpeg stream from cam to disk directly
[18:34] <kms_> say me how?
[18:35] <durandal_1707> ffmpeg -i input out.mjpeg
[18:36] <kms_> this command recompress stream
[18:36] <durandal_1707> ffmpeg -i input -c copy out.mjpeg
[18:38] <kms_> hmm, and can i broadcast this stream with ffserver without recompress?
[18:39] <durandal_1707> it is just doing copy, so it should work
[18:39] <kms_> VideoCodec copy?
[18:40] <durandal_1707> but note that my ffserver experience is near 0
[19:26] <kms_> enibody know, why i can't decrease output framerate in ffserwer with webm format?
[20:02] <evil_core> relaxed: equal bug with your static
[20:50] <Mista_D> Is there a quick way to drop frames (keep only one frame per second) but keep frame rate the sdame, repeating same frame for a second, then next... ?
[20:56] <retard> convert it to 1fps?
[21:43] <durandal_1707> Mista_D: you mean duplicating frames?
[22:48] <kms_> why i can not decrease framerate
[22:49] <kms_> i send to feed ffmpeg -f v4l2 -r 4 -g 1 -i /dev/video0 -vcodec libtheora -r 1 http://127.0.0.1:8090/feed1.ffm and recive from ffserver 4 fps. i need 1 fps
[23:05] <kms_> setting VideoFrameRate 1 option in ffserver config don't take effect
[00:00] --- Sat Mar 2 2013
More information about the Ffmpeg-devel-irc
mailing list