[Ffmpeg-devel-irc] ffmpeg.log.20111229

burek burek021 at gmail.com
Fri Dec 30 02:05:01 CET 2011


[00:33] <P-l> hey
[00:33] <P-l> ffmpeg -i cut.h264 -vcodec mpeg4 -qscale 5 -vf crop=1440:1072:0:4,scale=624:352,setdar=16:9 -bf 2 -b 1337 -pass 2 -f avi output.avi
[00:34] <P-l> Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[00:34] <P-l> any idea ? :/
[00:34] <P-l> plz
[00:36] <relaxed> P-l: -b 1337k
[00:37] <P-l> same issue
[00:37] <relaxed> er, wait. you can't use both -qscale and -b
[00:38] <relaxed> If you want a specific size use -b and -pass, if you want specific quality use -qscale
[00:42] <P-l> It doesn't work with qscale neither b
[00:43] <relaxed> did you run -pass 1 first?
[00:43] <P-l> yes I did, looks like : ffmpeg -i cut.h264 -vcodec mpeg4 -qscale 5 -bf 2 -pass 1 -an -f rawvideo -y /dev/null
[00:46] <relaxed> P-l: 1) omit -qscale and use -b $bitrate 2) you first pass command and second pass command should only differ by the pass number.
[00:47] <relaxed> your*
[00:47] <P-l> ok !
[00:47] <P-l> thank you, i will try now !
[00:47] <relaxed> use -y output.avi
[00:48] <relaxed> then the second pass will overwrite the first pass's output
[00:49] <Bertl> relaxed: is there a difference between outputting the movie twice instead of discarding the output on the first pass?
[00:50] <Bertl> i.e. does -f rawvideo -y /dev/null do any harm on -pass 1 ?
[00:52] <relaxed> I don't see the point when "-f avi -y /dev/null" works as well
[00:52] <P-l> thank relaxed it works ! 
[00:52] <P-l> ffmpeg -i cut.h264 -vcodec mpeg4 -vf crop=1440:1072:0:4,scale=624:352,setdar=16:9 -bf 2 -b 1337k -pass 1 -f avi output.avi
[00:52] <P-l> ffmpeg -i cut.h264 -vcodec mpeg4 -vf crop=1440:1072:0:4,scale=624:352,setdar=16:9 -bf 2 -b 1337k -pass 2 -f avi output.avi
[00:54] <relaxed> Bertl: I did read that the sync engine can be thrown off if you ignore the audio on the first pass. Sometimes it drops/dups frames to keep sync between the two.
[00:55] <relaxed> So the pass log may not exactly match from the 1st pass to the 2nd.
[00:55] <Bertl> okay, got it, so -f <format> -y /dev/null is fine, but rawvideo might not be, correct?
[00:57] <relaxed> please reread what I just said
[00:57] <P-l> .. Whats argument should I use to set my .avi in 
[00:57] <P-l> oups
[00:57] <Bertl> relaxed: what did I miss?
[00:58] <P-l> Whats argument should I use to set my .avi with MPEG4 XVID instead of FMP4 as codec ID ?
[00:58] <Bertl> -f avi shouldn't ignore the audio, should it?
[00:59] <relaxed> Bertl: nope
[00:59] <relaxed> P-l: -vtag XVID
[01:01] <P-l> thank you very much relaxed !
[01:01] <P-l> i got a lot of work 
[01:01] <Bertl> relaxed: so -pass 1 -f matroska -y /dev/null and -pass2 out.mkv should be fine as well, no? (and sorry if I'm missing the obvious here)
[01:25] <relaxed> Bertl: sure or you can overwrite the same file
[01:33] <huglester> guys what is the benefit of using 2 pass vs 1 pass? 
[01:35] <Mavrik> huglester, more accurate filesize for bitrate, better quality for same bitrate when using bitrate for quality specification, alot better bitrate handling when using the -vbv parameters
[01:35] <huglester> Mavrik: so seems for best results, 2 pass options is the right choise, thank you! 
[01:36] <relaxed> huglester: or -qscale if you don't need a certain size
[01:37] <Mavrik> huglester, yeah, if you're targeting with bitrate, if you want quality, usually -crf for h.264 is better suited
[01:38] <Mavrik> (that means quality control, not quality video :) )
[01:38] <huglester> :)) thanks guys 
[01:38] <huglester> this ffmpeg tools has a lot complex options I see 
[01:38] <huglester> the knowledge of how video works would be nice too :D 
[01:38] <Shimmy> https://ffmpeg.org/trac/ffmpeg/ticket/844
[02:57] <pHcF> http://stackoverflow.com/questions/8659568/ffmpeg-raw-input
[02:57] <pHcF> ideas?
[02:58] <pHcF> i'd like to know the command to transform tentative.raw back to testing.m4a (after doing "ffmpeg -i testing.m4a -acodec pcm_s16le -f rawvideo tentative.raw")
[03:26] <setmeaway> pts < dts in stream 0
[03:26] <setmeaway> anyone know how to fix this?
[03:26] <setmeaway> i suspected setpts but -vf "setpts=PTS-10" didn't worked
[04:29] <relaxed> pHcF: the output would only be raw yuv (no audio)
[04:30] <pHcF> yeah
[04:31] <relaxed> pHcF: ffmpeg -f rawvideo -s $WxH -r $framerate -pix_fmt yuv420p -i tentative.raw ... 
[04:31] <relaxed> I assume yuv420p
[04:33] <relaxed> pHcF: wait, m4a is audio. Is there any video?
[04:34] <pHcF> no video
[04:35] <relaxed> ffmpeg -i testing.m4a output.wav
[04:35] <relaxed> ffmpeg -i output.wav -acodec libvo_aacenc testing.m4a
[04:41] <pHcF> relaxed: i got it working
[04:42] <pHcF> ffmpeg -f s16le -ar 16000 -i output.raw -strict experimental -acodec aac -ar 16000 test.m4a
[05:01] <fling> what cpu is better for encoding?
[05:01] <fling> intel or amd? if i want some extra fps
[05:02] <relaxed> intel
[05:06] <robinsch> hi
[05:08] <robinsch> hi all, I need help with ffmpeg and I am a noob at this subject so please don't be mad
[05:09] <relaxed> ask your question
[05:10] <robinsch> I have my webcam streaming setup with this command: ffmpeg -i tcp://127.0.0.1:4888 -f flv "rtmp://fms180.blogtv.com/BlogTV/PRIVATE_KEY  flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
[05:11] <robinsch> my webcam software, webcam studio (on latest stable ubuntu 11.10), streams to port 4888
[05:12] <robinsch> this is the error i get: Seems stream 0 codec frame rate differs from container frame rate: 1073741824.00 (1073741824/1) -> 15.00 (15/1)
[05:12] <robinsch> [rtmp @ 0x1e20460] Server error: Failed to execute method (releaseStream).
[05:12] <robinsch> rtmp://fms180.blogtv.com/BlogTV/PRIVATE_KEY flashver=FMLE/3.0\20(compatible;\20FMSc/1.0): Input/output error
[05:14] <robinsch> I have googled this error and nothing seems to make any sense
[05:16] <robinsch> i also read the webcamstudio site and these are the 2 help pages they got:  http://www.ws4gl.org/broadcasts/fme-broadcasts   and http://www.ws4gl.org/news-flash-/webcamstudioxwebcamstudioforwindowsosxetc
[05:16] <robinsch> both don't seem to work for me
[05:17] <robinsch> ffmpeg -f video4linux2 -s 640x480 -r 15 -i /dev/video1 -f alsa -i pulse  -ac 1 -ab 64kb -ar 22050 -r 15 -b 400kb  -f flv "rtmp://1.395474.fme.ustream.tv/ustreamVideo/395474/1E1GFDetUFDtNL5o9JxQsAwlp9sRtGf flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
[05:17] <robinsch> ^ that says -b option is too ambiguous
[05:17] <robinsch> and without -b it doesn't work
[05:22] <robinsch> well if anyone knows the command I need to make this work that would be great, i will look around man page meanwhile
[05:27] <robinsch> -b:a or -b:v don't help, framerate issue comes up again
[05:29] <robinsch> I have blogtv allowed in my flash settings
[05:31] <robinsch> ok in the xml file it says framerate should be 25 and 320x240
[05:42] <robinsch> still no luck
[09:05] <udoprog> I'm trying to stream as uncompressed video as possible to a media server, which then should handle the compression on the fly, I've got working input using dshow, but I'm at a loss of which container, video and audio codec I should use. The goal is to stress the recording computer as little as possible and possibly do it with a bandwith <= 10mbps, any help?
[09:08] <defaultro> can ffmpeg create an animated gif from an mp4 file?
[09:09] <udoprog> defaultro: if it helps you can easily create an image series which you could convert to a gif manually; ffmpeg -i input out%d.jpg
[09:21] <defaultro> ok
[13:15] <Shimmy> #ffmpeg-devel
[13:15] <Shimmy> https://ffmpeg.org/trac/ffmpeg/ticket/747
[13:16] <Shimmy> Can anyone help me please? https://ffmpeg.org/trac/ffmpeg/ticket/747
[14:58] <transplant> Q: ASS subtitles are rendered and then ffmpeg gives AVRects to the calling code?
[14:58] <transplant> or, can be get plain text (like they were "srt" subs)?
[14:59] <transplant> I, for one would prefer plain text since the video player can manage "srt" files and do the rendering/overly itself
[15:21] <WasserDragoon> hi there, how to convert a video based on information from another video? is it possible?
[15:23] <WasserDragoon> i just can find this not really helpful post http://superuser.com/questions/367986/ffmpeg-or-mencoder-convert-a-video-using-another-one-as-a-reference-format-wis
[15:25] <rts0aic> hello all,who has the example code of convert wav to mp3?
[15:34] <Mavrik> WasserDragoon, err... I'm not sure what you want to do
[15:34] <WasserDragoon> convert one video with same params, same format as another one
[15:35] <WasserDragoon> its also described at the superuser.com post
[15:36] <Mavrik> huh, that won't be easy
[15:36] <WasserDragoon> rts0aic: ffmpeg -i sound.wav -ab 192k sound2.mp3 - you can change the bitrate if 192k isn't enough for you
[15:38] <rts0aic> WasserDragoon: no,i need the example code which is in ffmpeg SDK,not command.
[15:39] <Mavrik> there is no ffmpeg SDK, you'll have to see the examples and ffmpeg.c itself :)
[15:39] <WasserDragoon> i can get the information from a video but i don't know how to build the command based on this video to convert another video in the same format
[15:42] <WasserDragoon> but i dont think its enough information http://pastebin.com/MvAZYkM0
[15:43] <Mavrik> that's not even what you're looking for
[15:43] <Mavrik> instead tell what you'd like to achieve
[15:43] <Mavrik> you get just get encoding parameters from a video
[15:43] <rts0aic> Mavrik: huh,ok.i'm writing a music editor base on libav.but i have bug when decode wav to mp3.
[15:44] <WasserDragoon> its an mp4 file, the one i can play on my smartphone, the other one not. so i thought it's possible to easily convert a video using another one as a reference format to be able to play the other one as well on my smartphone
[15:45] <Mavrik> WasserDragoon, that would take analyzing the whole video, counting frames, checking which slices are used etc.
[15:46] <Mavrik> WasserDragoon, instead, go check specs for your phone and encode to that
[15:46] <WasserDragoon> oh
[15:47] <WasserDragoon> ok thanks
[15:47] <Mavrik> WasserDragoon, if it's h.264 you just probably have to set -profile baseline
[15:48] <Mavrik> when encoding with libx264
[15:50] <HektoR> Hello guys.Can anyone help me, please ? how can i install vhook for ffmpeg ?
[17:39] <malinens> Can somebody explain about 480x272 vs 480x270 resolution and why x272 is chosen? is it faster to convert or better quality can be achieved because of 272/16=17? or are there any other reasons?
[17:39] <Mavrik> not really
[17:39] <Mavrik> probably just rounding error when resizing via aspect ratio
[17:50] <malinens> can there be quality degradation using libx264 if 480x270 is used instead of 480x272? In different places there are different answers: for example: http://forums.ilounge.com/ipod-touch/217433-max-video-resolution-screen-resolution.html#post1199864 x272 is better...
[17:52] <Mavrik> malinens, if there is, it's probably not even measurable
[17:52] <Mavrik> malinens, don't worry about it
[17:52] <malinens> ok, tnx
[19:17] <mfwitten> I've got some clips from a DVD that I recorded with VLC. Some of the clips have a frame rate of 24+ FPS and others 24- FPS. Also, stepping frame by frame shows that there is one duplicate frame in every 6 frames or sometimes 1 duplicate frame in every 12 frames, which I believe is causing some jerkiness (which might be `telecine judder'?). Can someone tell me why the FPS is different for various clips and how I might go about replacing ...
[19:17] <mfwitten> ... the duplicate frame with some kind of smoother interpolation?
[19:33] <teratorn> anyone have a clue where I should start looking if mplayer complains like this about the stream I am encoding: http://codepad.org/HcmlgIG5
[19:34] <relaxed> teratorn: did you try ffplay?
[19:35] <teratorn> relaxed: ffplay plays the file OK but does complain in the same way
[19:35] <relaxed> version?
[19:35] <teratorn> mplayer plays to file too, seemingly correctly... Chrome does not
[19:35] <teratorn> (webm)
[19:36] <teratorn> http://codepad.org/qZuWQhmU
[19:36] <teratorn> Chrome just throws 4 totally generic decoding errors on to stderr, and never renders the video at all
[19:37] <teratorn> it's using some version of ffmpeg internally to do the decoding
[19:37] <teratorn> I'm just guessing the errors are related to the iframe/keyframe errors I get from mplayer/ffplay
[19:39] <teratorn> this is the file in question: http://teratorn.org/paste/broken.webm
[19:40] <teratorn> I really wish there was some tool (?) that examined a video file and gave detailed reports about any errors or inconsistencies
[19:42] <relaxed> you're encoding this with ffmpeg or your own software?
[19:43] <teratorn> my software which uses ffmpeg to do it
[19:44] <relaxed> by ffmpeg you mean its libs?
[19:45] <teratorn> right
[19:48] <relaxed> I can't help you there but maybe someone on the libav-user can. http://ffmpeg.org/contact.html
[19:49] <teratorn> alright, thanks
[20:20] <JmZ> hey
[20:20] <JmZ> ffmpeg: relocation error: /usr/local/lib/libavcore.so.0: symbol av_default_item_name, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference
[20:20] <JmZ> any idea how to resolve this issue?
[20:38] <huglester> guys, maybe someone knows of options youtube uses for encoding? I'd like to have 720p options, and 640 and 320... maybe someone can point me on good ways to accomplish that?
[20:40] <JEEB> youtube just uses lolfast options
[20:41] <b1j> What is the best way to determine the (average) audio/video bitrates of an input file (in my example an mkv) that currently reports 0 for both.
[20:42] <b1j> ffmpeg / mplayer / tcprobe all report 0
[20:43] <b1j> basically I would like to accurately reduce the size of a file while preserving certain quality but it's hard to do not knowing how much space is being taken up from audio vs video.
[20:44] <huglester> JEEB: you think so? :) 
[20:46] <JEEB> huglester, it's pretty much visible by their output :P Thus "I want to copy youtube" is not a good idea generally
[20:48] <huglester> JEEB: it's not copy, but I somehow feel they can do it in 'the right way'.. since they're long ago in this bussiness
[20:48] <huglester> JEEB: you mena just download the video, and look at videos information and then build the ffmpeg query? 
[20:49] <JEEB> all I can say to that is "lolololol" at your first line :V They're clearly just aiming towards keeping the bar low and getting the job done as fast as possible.
[20:50] <huglester> JEEB: I see :) thans for you input.. so I'll just keep digging :) 
[20:50] <JEEB> anyways, use libx264 and the slowest preset you can take + crf or 2pass bitrate mode depending on how you want to set up your site
[20:50] <JEEB> that's all there is to it
[20:53] <huglester> JEEB: thanks ... the way it will work. user uploads the video.. then the script processes it.. and then it is available for otrhers... 
[20:53] <huglester> I also want to have video in 2-3 sizes 
[20:54] <b1j> that's pretty much what I'm working on
[20:55] <huglester> b1j: nice one! how is it going? 
[20:55] <b1j> it's simple except for my question actually
[20:55] <b1j> some video files do not report the video/audio bitrate breakdown
[20:56] <b1j> so I cannot accurately transcode them
[20:56] <JEEB> huh
[20:56] <JEEB> why would you need the average bitrates of input for re-encoding o_O
[20:56] <b1j> I'm targeting specific bitrates
[20:57] <b1j> for example 512k video / 96k audio
[20:57] <JEEB> other than for the use of checking if it is small enough to be presented as-is (and for that you don't need the bitrate necessary)
[20:57] <JEEB> once again, why do you need to know the INPUT bitrates?
[20:57] <b1j> to accurately reduce
[20:58] <b1j> if the input is lower I have no reason to set higher during transcoding
[20:58] <JEEB> what
[20:58] <JEEB> I don't really follow the logic with that :D If it is of low bitrate, make it look even worse?
[20:59] <b1j> no, I'll try to explain
[20:59] <JEEB> the input size should only matter if you are thinking about keeping the input file or something like that
[20:59] <JEEB> like how nicovideo does it
[20:59] <JEEB> they have certain file size/average bitrate limits
[20:59] <JEEB> (and formats are limited of course)
[21:00] <b1j> I'm setting a bitrate maximum of 512k / 96k for video / audio
[21:00] <JEEB> if your video is within those limits, it gets uploaded as-is and an "economy mode" clip is encoded
[21:01] <JEEB> In all other cases you really shouldn't care about the _input_ bitrate(s)
[21:01] <b1j> what if the input is 64k audio and I up it to 96k, wouldn't I be inflating the size for nothing?
[21:01] <JEEB> depends on the input and output formats and settings, but if you're not going to just copy the input audio track in that case...
[21:02] <b1j> not just copying
[21:02] <JEEB> you'd be just making it even worse, basically
[21:02] <b1j> yes, I'd get the same lower quality audio at a higher file size
[21:04] <JEEB> It'd make sense if when you got the format your output is going to be the same as input, and if the average input bitrate is smaller than the bitrate you'd be encoding and you'd be skipping audio re-encoding in that case
[21:04] <b1j> so if the audio input is at 64k I want the transcoded output to remain at 64k. If it is 192k I would like to reduce it to the max 96k
[21:04] <JEEB> otherwise you should just encode it with your general ruleset, it really doesn't make much sense to control the bitrate by input bitrate tbqh
[21:05] <b1j> you may be right, am just trying to be as efficient as possible
[21:06] <b1j> so if you were transcoding a video and didn't know the audio bitrate what would you set the -ab to ?
[21:07] <JEEB> if you don't know what bitrate you want to set, you use quality-based settings :P
[21:07] <JEEB> also, it's pretty hard not to know the average bitrate of input streams because you can just take the input stream size and divide it with time :P
[21:07] <b1j> yeah, this mainly revolves around audio
[21:08] <b1j> could be 64k, could be 384k, only ears can tell
[21:08] <JEEB> in any case, using different rulesets per-bitrate basically means that your users will end up uploading stuff in ways that makes no sense
[21:08] <JEEB> like converting 64kbps AAC to raw PCM or something
[21:08] <JEEB> to get a better treatment
[21:09] <JEEB> now seriously, just stop that and make it follow some common ruleset, and if you want to be "efficient", check formats and bitrates before encoding, and just upload as-is if it's within the sizes/average bitrate limits you'd like
[21:09] <JEEB> derp
[21:11] <JEEB> Also, some systems just use some set crf for the first pass for video for example, and then check if the size is smaller than what would have been gotten with the standard bitrate. If it is smaller, use the crf output, if it is bigger, do a second pass with the set bitrate
[21:14] <b1j> thanks for the input, it seems what I'm trying to do cannot be done. Or just doesn't make sense
[21:15] <b1j> the video portion is easy, what confused me the most is I have no idea how space the Audio portion is taking up.
[21:15] <JEEB> basically I don't see any sense in a system that worsens quality even more deliberately just because input quality _might_ have sucked. And thus encourages people to upload even their crappy stuff with higher bitrates just to get them look better.
[21:16] <b1j> no you completely misunderstood
[21:16] <JEEB> no, as far as I think I haven't misunderstood
[21:16] <JEEB> you look at the input bitrate, check if it is under a certain limit, if it is set the output bitrate to match'ish.
[21:17] <JEEB> which leads to the fact that if you upload a 64kbps track and the track decoded as WAV/PCM the WAV/PCM version will end up being treated better
[21:17] <JEEB> just because it had more bitrate
[21:17] <b1j> hmmm that would be correct actually, I do see what you mean
[21:18] <b1j> although most would not be that smart
[21:18] <JEEB> in any case, I would pretty much forget about looking at the file sizes and bitrates of input files for anything else but statistical purposes
[21:18] <JEEB> yes, but it still encourages people to use more of your bandwidth to get their stuff up
[21:18] <b1j> yes, I'm going to have to rethink my method here
[21:19] <b1j> tyvm for the insight
[21:19] <JEEB> no problem
[21:19] <JEEB> the only case where I would actually use the input bitrate/file size stuff would be like nicovideo does it
[21:20] <JEEB> if they're under certain limits and the formats match, you use the input clip as-is
[21:20] <JEEB> in which case you save both CPU time as well as space (or at least the CPU time)
[21:23] <b1j> I was using that thought process since it's for video streaming where storage and bandwidth play a big part in cost
[21:24] <b1j> was concerned more with target file sizes as opposed to a crf
[21:25] <JEEB> you can have the file size you are comfortable with, and encode with the first pass being a crf encode with some crf value you have selected
[21:25] <JEEB> then after that is done, you check
[21:25] <b1j> yes
[21:25] <JEEB> if it's within your size limits, you use that
[21:26] <JEEB> otherwise you encode with the bitrate that gives you the file size you are comfortable with
[23:04] <Shimmy> Can anyone please help: https://ffmpeg.org/trac/ffmpeg/ticket/747
[23:05] <Shimmy> #ffmpeg-devel
[00:00] --- Fri Dec 30 2011


More information about the Ffmpeg-devel-irc mailing list