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

burek burek021 at gmail.com
Fri May 9 02:05:01 CEST 2014


[01:01] <ChannelZ-Wk> Anyone good with stream/channel mapping?  I can't get my head around something.
[01:01] <c_14> State your problem and maybe someone will be able to help you.
[01:02] <ChannelZ-Wk> I have a Quicktime with an audio stream which has 3 channels.  I want to take that and tag the first two channels as Left and Right respectively, and the third as a mono track
[01:05] <ChannelZ-Wk> So I guess I want to actually break it into 2 audio streams; a stereo one, and a mono.
[01:10] <c_14> Can you try: ffmpeg -i input -map 0:0 -map 0:0 -map_channel 0.0.0:0.0.0 -map_channel 0.0.1:0.0.1 -map_channel 0.0.2:0.1 output
[01:13] <c_14> Assuming the audio stream is stream 0 that is...
[01:15] <ChannelZ-Wk> 0:0 is video, 0:1 is the 3 channel audio.  But let me adapt and try.. thanks
[01:16] <FreezingCold> -c:v libx264 -preset slow -crf 18 -c:a libvorbis -q:a 5 -pix_fmt yuv420p
[01:16] <FreezingCold> I tried using those settings but it claims it's not a valid preset
[01:18] <c_14> !paste FreezingCold
[01:34] <ChannelZ-Wk> ah, think I got it.  My problem seems to be that if I also try to use  -filter_complex asetnsamples=n=16384  it ignores my stream mapping.
[01:37] <c_14> Ye, that's probably because (according to the ffmpeg output) -map_channel is forwarded to lavfi as -af ... and I'm guessing -filter_complex then overrides that.
[01:41] <ChannelZ-Wk> How I despise Quicktime.
[01:43] <ChannelZ-Wk> c_14: Thanks for your help
[01:43] <c_14> np
[01:44] <ChannelZ-Wk> Making a bunch of ProRes. Quicktime Player on PC is a POS and unless you have a longer mux rate for the audio, it will randomly drop frames on playback. asetnsamples is the only way I've found to lengthen the mux.
[01:44] <ChannelZ-Wk> oh well
[01:53] <ChannelZ-Wk> One thing, it tells me "-map_channel is forwarded to lavfi similarly to -af pan=...."  followed by a "This syntax is deprecated. Use "|" to separate the list items."  Is it telling me the -map_channel syntax I used is deprecated, or the -af pan syntax _it_ turned it into is? :)
[01:56] <c_14> Excellent question. I have no idea.
[02:10] <ChannelZ-Wk> I'll update my build (it's a little stale) and see what it says.  Heading home for now. Thanks again.
[02:11] <l_r> can ffmpeg restart itself under some conditions?
[03:59] <DOZO> does anyone know a way to identify unknown audio formats/codecs? using ffmpeg or anything else
[03:59] <DOZO> ffprobe just tells me "Invalid data found when processing input"
[04:00] <sacarasc> Try mediainfo, maybe?
[04:01] <DOZO> will do
[04:04] <DOZO> nope, all it reports is the file size
[04:06] <sacarasc> What do you think it should be?
[04:09] <DOZO> well, i'm trying to work with a program for an old computer that doesn't support WAV files, so i used it to convert a sample sound file to formats described as "YM2608 ADPCM", "MSM6258 ADPCM", "RF5C68 PCM", "Macintosh PCM" and "Unsigned 4-bit PCM"  and am looking for a way to open/save/convert one of those on a modern computer
[04:10] <DOZO> the "Unsigned 4-bit PCM" is what I actually need but i might be able to convert from one of the other formats to it
[04:11] <DOZO> ffmpeg's adpcm_yamaha doesn't seem to be YM2608 ADPCM unfortunately
[04:27] <helsinki> why `avformat_open_input` would block(wouldn't return forever) when openning some bad streams rather than return failure?
[06:20] <joseph_> using -vcodec libx264 gives me "Unknown decoder 'libx264'", even though I have libx264 installed. What's going on?
[06:42] <relaxed> joseph_: did you compile ffmpeg?
[06:42] <relaxed> oh, libx264 isn't a decoder
[06:43] <relaxed> you probably put -vcodec libx264 before the input, instead of after
[08:32] <maksimkaaa> Hello, I have around 3000 frames as follows: first 1000 with frame rate of 5fps, next 2000 with 12 fps. I am looking for any documentation to handle multiple frames rates in a single video, could you please advice? I couldn't find the topic or examples on this in the docs..
[08:39] <DeadSix27> i there any way in which ffmpeg is able to identify if a video in the mp4 container has the "faststart" flag?
[08:40] <DeadSix27> actually, is there way i can ientify it by using ffmpeg*
[10:40] <Mavrik> DeadSix27, I doubt it, but a simple byte check should do
[10:40] <Mavrik> the whole thing about faststart is just that mp4 MOOV atom is at the start
[10:41] <Mavrik> so you can easily write a script to check if FTYP is followed by MOOV
[11:29] <ergZay> I want to add -DTRACE to the compile of ffmpeg but it doesn't seem to work
[11:29] <ergZay> I'm trying to do ./configure --extra-cflags="-DTRACE=1"
[11:32] <ergZay> nvm seems to work now
[13:55] <lxer> i'm trying to cut off the first 0.5 sec of some video framents, and then concatenate them into 1 video again. However, this is causing sync problems and a lot of these erors: [mp4 @ 0x349f6c0] Non-monotonous DTS in output stream 0:0;
[13:57] <lxer> I'm using  -ss 00:00:00.5  to trim the fragments, but I guess that isnt right. What is the correct way?
[14:27] <hsch_web> hello
[14:29] <hsch_web> is it possible to use ffmpeg to record audio to files that stores the audio of a hour and each file is created on the hour
[14:33] <[A3G1S]> hey guys, I am trying to concat 2 videos of different sizes/resolution
[14:34] <[A3G1S]> can anyone help me with that, I am able to concat videos which have same size/resolution
[14:37] <lxer> how is it not working?
[14:40] <[A3G1S]> i am trying to figure that out
[14:40] <[A3G1S]> I have used steps from http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files
[14:40] <[A3G1S]> and is able to merge two files of same size
[14:41] <[A3G1S]> *videos of same resolution*
[14:44] <klaxa|work> maybe use a combination of scale/crop and the concat video filter in a filter complex
[14:45] <lxer> perhaps add -qscale:v 1
[14:47] <[A3G1S]> trying
[14:48] <sebastian__> Hello anyone out there ?
[14:48] <[A3G1S]> lxer that didn't work
[14:49] <[A3G1S]> i probably need to do something like this
[14:49] <[A3G1S]> http://stackoverflow.com/a/17610511/938012
[14:49] <sebastian__> I have an Issue using Spotify, is there anyone out there who can help ?
[14:50] <lxer> [A3G1S]: i was just reading this (for some other issue) http://stackoverflow.com/questions/12847262/ffmpeg-video-concatenation-audio-videotrack-synchronisation
[14:50] <sebastian__> I get an response like: "12:44:00.455 W [audio_file_decompressor_ffmpeg.cpp:387] Failed to open stream" what does that mean? what is going wrong there ?
[14:51] <[A3G1S]> ok k
[14:56] <sebastian__> is everyone busy ? --- btw I am using that chat the very first time, sorry for inconviniences
[14:56] <lxer> tell what you try to do. what is giving errors
[14:57] <sebastian__> Thanks ,.. I am only trying to play an mp3 file stored on my harddisc with spotify
[14:58] <sebastian__> Hahaaaa ,..... sooory ,.. fixed it
[14:58] <sebastian__> OMG ,..... somebody shoot me ,....
[14:59] <sebastian__> of course I have to mount the drive before using it ,..
[15:01] <sebastian__> OKay ,... thanks for making my brain work ,.. bye
[15:09] <lxer> I have many (small) mp4 files where the audio starts playing about 0.5 sec after the video started. Does this have something to do with syncing to keyframes or something? what causes this / what can I do about it?
[15:12] <ac_slater> so I guess h264 isnt a supported RTP payload format  for libavformat? It's not listed in the rtp_payload_types array :(
[15:16] <ac_slater> hmm but it does with via -vcodec libx264
[15:17] <ac_slater> and is it true that ffmpeg's rtp only allows for 1 stream?
[18:38] <Snowleaksange> any recommend example for how to av_probe_input_format a buffer?
[19:40] <Snowleaksange> i can open a file fine
[19:40] <Snowleaksange> but cant for the life of me open a buffer
[19:41] <Snowleaksange> i remember i actually modified a previous version of av_probe_input_format()
[19:50] <Snowleaksange> sucks how buggy this still is.  the whole ffmpeg api tbh is horrendous by modern standards
[19:54] <kolizer> ?
[20:13] <Snowleaksange> ah hmm i guess none of my my custom aviocontexts have worked since i upgraded ffmpeg
[20:13] <Snowleaksange> so my issue not necessarily related to av_probe_input_format
[20:13] <Snowleaksange> thats encouraging
[20:54] <kolizer> hello
[20:55] <kolizer> what overlay webcam on video?
[20:55] <kolizer> how overlay webcam on video?
[20:56] <lxer> que?
[20:57] <kolizer> what lxer
[20:57] <kolizer> ?
[21:02] <SpartanWarrior> hey guys, I have a problem converting a sequence of pngs to a video, apparently the first frame in the output doesnt seem to follow the fps I provided, here is what I put: http://pastebin.com/iuJNd8jS
[21:03] <SpartanWarrior> I saw it was a reported bug, but the workaround I found never worked :/
[21:17] <Snowleaksange> maybe the image2 format just doesn twork with custom AVIOContext
[21:18] <Snowleaksange> ffmpeg is possibly the worst software in the world by metric = trojan timesuck potential * number of users
[21:21] <lxer> true. mostly because documentation is old/wrong/missing.
[21:23] <kolizer> how overlay webcam on video?
[21:35] <c_14> kolizer: Look at the overlay filter
[21:36] <c_14> SpartanWarrior: I'm not sure what to tell you, but your command works for me.
[21:37] <SpartanWarrior> c_14, is the first frame duration correct? it should be exactly 1 second as the other ones
[21:38] <c_14> Wait, you're right.
[21:38] <c_14> I lost track of which frame was first.
[21:39] <c_14> That only happens when I output to mp4 though...
[21:50] <c_14> SpartanWarrior: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images#Ifyourvideodoesnotshowtheframescorrectly
[21:50] <c_14> I used -vf fps=11 instead of -r 11 and the first frame is shown corretly.
[21:52] <SpartanWarrior> c_14, using the fps would modify the video sound? I'm doing a slideshow
[21:52] <SpartanWarrior> fps filter*
[21:53] <c_14> It shouldn't.
[21:53] <SpartanWarrior> i'll give it a shot
[21:58] <SpartanWarrior> indeed it doesn't affect the sound, but now the video is all black and only one frame appears in the middle x_x
[22:01] <c_14> what?
[22:01] <c_14> That wasn't supposed to happen.
[22:01] <SpartanWarrior> forget it, it's working
[22:01] <SpartanWarrior> BUT
[22:01] <SpartanWarrior> now it's the last frame what is not appearing :/
[22:07] <c_14> Well, if it's the last frame, the cheap answer would be to copy the last frame to last frame + 1...
[22:08] <c_14> It is apparently a known bug: https://trac.ffmpeg.org/ticket/2674
[22:10] <c_14> Might I ask why you even bother setting an output framerate?
[22:11] <c_14> If I just set the input framerate via -r 1, the output steps through 1 picture per second and skips neither the first nor the last frame.
[22:11] <kolizer> -f x11grab
[22:11] <kolizer> f v4l2
[22:11] <kolizer> i use -filter_complex overlay=
[22:11] <kolizer> c_14
[22:12] <kolizer> and drop(
[22:13] <kolizer> whay?
[22:13] <SpartanWarrior> i tried using only -r 1 but the output was a video with anything else than 1fps
[22:14] <SpartanWarrior> (it was faster, way faster)
[22:16] <c_14> kolizer: I'm afraid I don't understand what you're trying to tell me, could you paste your complete command and all output?
[22:16] <SpartanWarrior> i gues i'll stay with the nasty hack of cloning a frame :(
[22:16] <kolizer> ffmpeg -y \
[22:16] <kolizer> -f x11grab -video_size 1280x720 -framerate 30 -show_region 1 -i :0.0+0,49 \
[22:16] <kolizer> -f video4linux2 -input_format mjpeg -i /dev/video0 -c:v copy \
[22:16] <kolizer> -filter_complex overlay=main_w-overlay_w:main_h-overlay_h \
[22:16] <kolizer> -vcodec libx264 -preset veryfast -maxrate 1400k -bufsize 1400k -g 60 \
[22:16] <kolizer> -threads 0 \
[22:17] <c_14> SpartanWarrior: if you ffprobe your output file what does it say for fps
[22:17] <c_14> kolizer: next time use a pastebin service please
[22:17] <kolizer> ok
[22:18] <c_14> kolizer: So what's the problem?
[22:18] <kolizer> drops
[22:18] <kolizer> low fps
[22:19] <SpartanWarrior> http://pastebin.com/iSxfYqxJ
[22:19] <c_14> That's the one where you only specified the -r 1 on the input file?
[22:20] <SpartanWarrior> yes
[22:20] <SpartanWarrior> the original file
[22:21] <c_14> Weird, why does ffmpeg think the fps is 11...
[22:22] <kolizer> 5 fps(
[22:22] <c_14> kolizer: Try adding -r 30 before -i /dev/video0
[22:24] <kolizer> /dev/video0: Invalid argument c_14
[22:24] <kolizer> oh no
[22:25] <kolizer> fps=0.5
[22:25] <c_14> That's just the encoding fps.
[22:25] <c_14> Ie how many frames ffmpeg is encoding per second.
[22:26] <c_14> That has nothing to do with the fps of the actual output.
[22:26] <kolizer> frame=   35 fps=0.3 q=23.0 size=
[22:27] <Hello71> you're encoding at 0.3 fps.
[22:27] <Hello71> meaning it will take you approximately 200x the duration of the video to encode
[22:27] <Hello71> assuming 60fps.
[22:29] <kolizer> what to do?
[22:29] <kolizer> http://pastebin.com/59bcVM2e
[22:29] <c_14> Normally, this isn't that much of an issue. If you want to encode faster, you can change your preset to superfast or ultrafast
[22:31] <jamesaustin> Question: How do I convert a 240 fps video to 60 fps but retaining all the frames, ie. making it 4 times longer?
[22:31] <SpartanWarrior> weird :/
[22:32] <jamesaustin> I tried: ffmpeg -r 240 -i in.mp4 -filter:v "setpts=4.0*PTS" -r 60 -an out.mp4
[22:34] <c_14> jamesaustin: What happens if you leave out both the -r options?
[22:36] <jamesaustin> c_14: It seems to not alter the fps. 240fps in, 240 fps out.
[22:36] <jamesaustin> c_14: As if the "setpts" is ignored.
[22:37] <c_14> But the video is 4x as long?
[22:38] <kolizer> why do I have a low FPS?
[22:38] <jamesaustin> Ok, my mistake. I had a second -filter:v on the command. Which appears to overwrite the first.
[22:39] <c_14> ye, they do that. just separate the filters with commas or use -filter_complex
[22:39] <jamesaustin> Thanks - sorry for the stupid question.
[22:39] <c_14> Happens to the best of us.
[22:40] <kolizer> I do not understand c_14
[22:41] <c_14> kolizer: Encoding video takes time, depending on the input and output video and the computer it can take more or less time. The fps=0.3 output ffmpeg is giving you is telling you that ffmpeg is currently encoding the source video at 0.3 frames per second.
[22:43] <c_14> If you want the video to encode faster, you need a less complex source, -preset {superfast,ultrafast}, a lower resolution, a faster compression algorithm/implementation, or a faster computer.
[22:44] <kolizer> i use superfast,ultrafast, low fps
[22:49] <kolizer> CPU 5% over c_14
[22:49] <c_14> That's strange.
[22:49] <c_14> try removing -threads 0
[22:51] <kolizer> no
[22:54] <kolizer> oh(
[22:58] <kolizer> http://pastebin.com/T01rZRRY c_14
[22:58] <kolizer> fps 15 why?
[22:59] <c_14> The fps of the file or the fps ffmpeg is telling you while it's encoding?
[23:00] <kolizer> while it's encoding
[23:08] <kolizer> maybe need webcam setting c_14?
[23:10] <c_14> I'm testing with my own right now.
[23:20] <c_14> So I just tested it with my webcam, ffmpeg says it's encoding with 15fps, but when I play the output file, it has 30fps and it seems to be encoding at the same speed that I'm playing the output, which I gander is what you're after.
[23:25] <kolizer> and?
[23:27] <c_14> So what I'm saying is just try the command and while the command is working, play the output and see if the encoding keeps up with the speed you're playing the file at.
[23:32] <kolizer> Video is too quick c_14
[23:33] <c_14> Is the video too fast or is the encoding too slow?
[23:34] <kolizer> video too fast
[23:35] <c_14> Try adjusting the framerate until the video plays at normal speed.
[23:53] <kolizer> ok works overlay c_14
[23:54] <kolizer> bat Sound late on webcam
[23:56] <c_14> Try using -itsoffset to adjust until it's in sync
[00:00] --- Fri May  9 2014


More information about the Ffmpeg-devel-irc mailing list