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

burek burek021 at gmail.com
Sun Oct 26 02:05:01 CEST 2014


[00:01] <c_14> Or convince your webcam to give you something raw and convert with ffmpeg.
[00:04] <sanooj> I'm so close though
[00:04] <sanooj> maybe.
[00:31] <sanooj> libv4l2-hw-code says the minimum value for the i-frame period is 10000
[00:31] <c_14> 10000 what?
[00:32] <sanooj> I'm not sure what the units are there. it's currently reported as about 9.7 sec on youtube
[00:32] <sanooj> so I'm guessing milliseconds.
[00:32] <c_14> What does youtube want?
[00:32] <sanooj> 2 seconds
[00:32] <c_14> My goodness.
[00:32] <c_14> That's a bit
[00:32] <c_14> Excessive.
[00:33] <c_14> Especially since the only reason they want that is so they can cut the video into more chunks.
[00:33] <sanooj> apparently there's a way to force the camera to generate an i-frame when you want it to using deep uvc magic, but it's 2am and it's not been implemented elsewhere afaict...
[00:34] <sanooj> you need to poke it periodically rather than let it do it itself.
[00:34] <sanooj> so. raw bits you said. x264 you said.. :)
[00:35] <c_14> while true; do poke; sleep 1.9; done ?
[00:35] <sanooj> I think you may need to hang on to the fd the kernel gave you
[00:36] <sanooj> so poke /proc/pid/fd/thefd...
[00:36] <sanooj> whatever... let's burn them cycles.
[01:01] <sanooj> hum. the webcam can't give me raw images at a decent frame rate
[01:03] <sanooj> why is this so hard?
[01:03] <c_14> Does it produce raw frames at a different rate than encoded frames?
[01:03] <sanooj> yes.
[01:03] <c_14> wat
[01:04] <sanooj> probably because it's a usb webcam and the bw is limited.
[01:04] <sanooj> so at 1920x1080 YUV 4:2:2 we can get about 5 fps
[01:04] <sanooj> using mjpeg or h264 we get 30 fps
[01:05] <sanooj> I did put it in the usb3.0 port, but apparently that's no good
[01:05] Action: c_14 loves hardware limitations (not).
[01:06] <c_14> How badly compressed are the mjpeg/h264 frames?
[01:06] <buzzykins> Hi- in the ffmpeg stderr output, is the fps value the average fps of the entire video or the current fps value that the recording is at?
[01:06] <c_14> You might be able to reencode them.
[01:06] <sanooj> that's the plan
[01:06] <c_14> buzzykins: the latter
[01:07] <sanooj> although I find the angle of the uphill in this task a bit much. I wanted to live stream at a nice fps and bitrate.  a few hours later I'm knee deep in someone else's ioctls
[01:08] <danomite> I don't understand the error i'm getting at the bottom of my paste http://pastebin.com/e6HsTwQ7
[01:08] <c_14> The wonder that is youtube's regulations on what input it accepts.
[01:09] <c_14> danomite: pastebin your ffserver.conf please
[01:09] <c_14> And an ffprobe of cam1.mp4
[01:09] <buzzykins> thanks
[01:11] <danomite> ffserver.conf: http://pastebin.com/PMxkKaBq ffprobe /tmp/cam1.mp4 http://pastebin.com/HWfa4sdF
[01:14] <danomite> c_14 thanks for taking a look
[01:14] <c_14> danomite: try getting rid of -acodec copy?
[01:15] <c_14> Although, that should only be taken into account with -override_ffserver...
[01:15] <danomite> c_14, same error with -acodec copy removed, I don't understand -override_ffserver
[01:15] <danomite> I don't know that switch
[01:16] <c_14> It tells ffmpeg to ignore codec options in ffserver.conf in favor of what's given on the command line.
[01:17] <danomite> new error :(  http://pastebin.com/BWrPs7LT
[01:18] <c_14> does ffserver output anything interesting?
[01:18] <danomite> nope
[01:18] <c_14> Ok, get rid of the -vcodec copy?
[01:19] <danomite> new error: http://pastebin.com/5zD4a54C
[01:20] <danomite> the video is only 1 fps
[01:20] <c_14> Shouldn't be relevant.
[01:20] <c_14> get rid of -override_ffserver?
[01:21] <c_14> If that doesn't work, the next step is to go back to your first command, add -i aevalsrc=0 -c:a pcm_s16le while getting rid of -acodec copy
[01:21] <danomite> Missing audio stream errorhttp://pastebin.com/MXdUN4f5
[01:23] <danomite> new error: http://pastebin.com/ihsBeZiT
[01:24] <c_14> ehh, try adding -f lavf before the -i aevalsrc=0
[01:25] <danomite> new error http://pastebin.com/Z35yT3VD
[01:27] <danomite> lavfi
[01:28] <danomite> now it appears to be playing :)
[01:28] <danomite> now for the stream
[01:29] <danomite> ffplay error: http://pastebin.com/wrY248at
[01:38] <c_14> Hmm, I'm confused as to why you're getting a 503. I tried setting up the same thing and I keep getting 404s
[01:39] <danomite> I have 4 commands setup to test the streams with ffplay, per protocol (http/rtsp) per port (8080, 8554) the stats page only lists one stream and the only one that's making the hit counter tick is giving a different error
[01:40] <danomite> ffplay error: http://pastebin.com/i6YSqmcb
[01:43] <c_14> eeeeh, I'm out of ideas. ffserver is tricky at the best of times, but I don't know why it's failing at rtsp...
[01:43] <c_14> You could try the mailing list in the hope that someone might know what's going on, or wait around here.
[01:44] <danomite> i do have another question with ffmpeg
[01:44] <c_14> shoot
[01:44] <danomite> http://pastebin.com/Ymavj30y
[01:44] <sanooj> re-encoding the stream with libx264 at 1080p nets me 15 fps instead of 30
[01:44] <sanooj> it's not bad, but it could be better
[01:45] <c_14> -preset ultrafast?
[01:45] <danomite> the video is only 1 fps, but the fps reported by ffmpeg is 60, sometimes larger
[01:45] <c_14> encoding fps
[01:45] <c_14> Not related to the fps of the video.
[01:46] <danomite> will it respect the end of the video and loop or do something else?
[01:46] <sanooj> it's a live stream. it really should keep up
[01:46] <c_14> danomite: when ffmpeg hits eof it will stop
[01:47] <c_14> sanooj: depends on cpu and other factors
[01:47] <danomite> cool, thanks
[01:48] <sanooj> yeah, so basically youtube isn't going to work for us because we really need the hw encoder
[01:50] <danomite> damm, now my ffmpeg is telling me the aac encoder is experimental :(
[01:51] <c_14> -strict -2
[01:54] <danomite> still doesn't like it
[01:54] <danomite> I ran out of pastebin, looking for another
[01:54] <c_14> sprunge.us, pastie, ix.io
[01:55] <danomite> https://pastee.org/qptkb
[01:55] <c_14> eh, it needs to be an output option
[01:55] <c_14> ie after the last -i foobar
[01:56] <danomite> thanks, man, that was a big head ache
[01:56] <danomite> i was running into it all week
[01:58] <danomite> https://pastee.org/yhy22
[01:58] <danomite> back to the ffserver problem :(
[01:59] <c_14> Try with an updated version of FFmpeg?
[01:59] <c_14> You can grab one of the static builds and try with that maybe.
[01:59] <c_14> If that doesn't help, I'd ask the ml.
[02:00] <danomite> thanks, I didn't see it was so out of date
[02:01] <danomite> Fedora is beginning to feel like a second class distro
[02:03] <danomite> the static build doesn't include ffplay or ffserver
[02:04] <c_14> I remember john's build having it.
[02:04] <c_14> http://johnvansickle.com/ffmpeg/
[02:04] <danomite> I grabbed the 64bit of that
[02:06] <c_14> It won't have ffplay, because that needs to be linked to weird things.
[02:06] <c_14> Hmm, looks like it doesn't have ffserver either.
[02:07] <c_14> You can always compile, usually doesn't take that long depending on what you need to activate.
[02:12] <sanooj> so could I get faster h264 using vaapi?
[02:13] <danomite> I'm most concerned about the download time
[02:13] <sanooj> or is there some new hotness since vaapi?
[02:14] <c_14> Hardware accelerated h264 encoding is very meh at best.
[02:14] <c_14> danomite: for a git snapshot?
[02:15] <danomite> i'm cloning the repo, going to checkout to latest stable tag
[02:16] <c_14> https://ffmpeg.org/releases/ffmpeg-2.4.2.tar.bz2 <7.0 M
[02:16] <c_14> snapshot of git master as of version 2.4.2, but git master is usually preferred https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 < 7.1M
[02:17] <danomite> sweet, thanks for that tarball!
[02:20] <danomite> wow there' s a ton of options
[02:20] <c_14> You probably won't need most of them.
[02:21] <danomite> default would be ok?
[02:22] <c_14> In your case it probably should.
[02:28] <danomite> build done, looks like there's some new errors i'm gonna take a look at
[02:28] <danomite> thanks for the help
[02:35] <danomite> the new ffmpeg build seg faults with the same command options
[02:35] <danomite> the new ffserver runs
[02:35] <danomite> but same connection refused error
[02:36] <c_14> eeh, git or release?
[02:36] <danomite> release
[02:36] <danomite> I used: ./configure --enable-nonfree
[02:37] <c_14> try with git to see if the bug's been fixed. If that doesn't work, ask the ml. I'm pretty much out of ideas and it's getting late and I need some sleep. When posting to the ml, make sure you give as much information as possible, including complete commands and console output.
[02:39] <danomite> I'll get a ml post set up, thanks you've helped a ton!
[02:40] <sanooj> so turns out the libv4l2-hw-code test program might be lying. it shows the *current* value of iFramePeriod as the minimum value.
[02:58] <danomite> A fairly long draft of what i'm going to post to the mailing list: https://pastee.org/wythj
[03:11] <sanooj> alright. so if one tweaks the test program it's actually possible to set the wIFramePeriod
[03:11] <sanooj> unfortunately then something goes and resets it after a while, when streaming
[03:14] <sartan> hey guys is there a way to avoid using a filelist when using ffmpeg -f concat? it would be convienent if i could just use filesystem globbing or even specify a list of files to concatonate directly on the command line: writing to a text file is an extra step that would be nice to avoid
[03:17] <sartan> the trac wiki says ffmpeg -i "concat:file1|file2" -c copy output.mp4 ! that was not that difficult to find. thank you #rubberduck!
[03:24] <sanooj> woot
[03:25] <sanooj> it's still slow, but hey it kinda works with the copy codec now
[03:25] <sanooj> ioctls!
[03:26] <sanooj> not sure why it's still only 15 fps
[03:27] <sanooj> nor why ffmpeg is taking so much cpu
[03:31] <sanooj> ah, because it wasn't vcodec copy
[03:31] <sanooj> but it is now. still 15fps tho
[03:31] <sanooj> maybe the bitrate is too high
[03:32] <sanooj> anyway it's stupid o'clock in the morning.
[03:32] <sanooj> night
[03:39] <cortexman> can i run an fft on an audio file and get the data out
[03:44] <sanooj> how can I check how many frames are i-frames from an flv file I made?
[03:45] <sanooj> because something is lying to me.  the ioctls claim the period is 2000, but youtube is still claiming it's one i-frame every 10 sec.
[05:50] <spectralsun> I would like to add keyframes to a video, what command should I use for this?
[05:51] <spectralsun> I'm assuming I will re-encode it
[06:00] <fling> I have a video with an audio only in the right channel.
[06:00] <fling> Left channel is muted.
[06:00] <fling> How to fix? I want to extract right channel audio somehow.
[06:00] <fling> -map_channel 0.0.1 ?
[06:01] <shevy> anyone has an idea how to fix this error message "Encoder (codec mp3) not found for output stream #0:0"?
[06:02] <shevy> The command I try is: "ffmpeg -i test.mp3 -af volume=+20dB output.mp3"
[06:05] <debianuser> fling: check these: https://trac.ffmpeg.org/wiki/AudioChannelManipulation
[06:05] <fling> debianuser: already fixed :>
[06:05] <fling> debianuser: do you remember my usb headset porblem?
[06:06] <fling> debianuser: I fixed it on one of the boxen reconnecting to an usb3 port.
[06:06] <fling> I had the problem because of too low bandwidth :P
[06:07] <debianuser> fling: Great! Thanks for reporting!
[06:08] <fling> debianuser: linphone problem is not fixed on all the boxen I have.
[06:22] <spectralsun> trying to reencode with this command "ffmpeg -i ns-0f483bb1-59d2-4014-aef6-17d1bb0450b1.mov -acodec copy -g 15 tmp.mov"
[06:22] <spectralsun> but it's only making a video of a few seconds long
[06:23] <spectralsun> does this message mean anything: "[mov @ 0x39e6480] Packet with invalid duration -30684 in stream 1
[06:26] <fling> spectralsun: probably.
[06:28] <spectralsun> hmm
[06:28] <spectralsun> I am trying to re-encode to add keyframes
[07:25] <arwa> how to create a new patch instead of pasting it on the prev one?
[10:16] <pentanol> arwa use diff
[10:43] <arwa> what does diff do?
[10:43] <arwa> and can you tell me the syntax?
[10:58] <pentanol> diff making diffs or patches
[10:58] <pentanol> what you want to patch there?
[11:00] <ubitux> arwa: squash with a rebase for example
[11:01] <ubitux> arwa: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
[11:02] <ubitux> also, wrong channgel
[11:02] <ubitux> channel*
[13:02] <sanooj> hey all.
[13:03] <sanooj> how can I find out the number of keyframes in an .flv video?
[13:06] <sanooj> I'm trying to twiddle my webcam to output more keyframes because youtube wants me to, but instead of waiting for youtube to moan at me, I'd like to make a small test capture and just count the key frame rate.
[13:10] <sanooj> when ffprobe -show_frames says key_frame=1 does this mean an I-frame?
[13:14] <sanooj> ah, no, there actually is a pict_type=I field. must read output.
[15:04] <emilsedgh> Hi guys. I have a capture device supported by v4l. I want to stream it to an rtm stream. The video works fine. However, im not really sure how Im supposed to mix the audio it.
[15:04] <emilsedgh> here's what im doing:
[15:04] <emilsedgh> avconv  -f alsa -i hw:2,0 -ac 1 -c:a libmp3lame -re -f video4linux2 -r 25 -i /dev/video1 -c:v libx264 -f flv rtmp://192.168.1.5:1935/Test1/myStream
[15:05] <sanooj> hey dude. I just fixed this for me.
[15:05] <emilsedgh> hw:2,0 is the proper device, I tested it. but it tells me: flv does not support that sample rate, choose from (44100, 22050, 11025). and Could not write header for output file #0
[15:05] <emilsedgh> sanooj: you were talking to me?
[15:05] <emilsedgh> i'd love to know how you fixed it :)
[15:05] <sanooj> yes. well my working incantation is this: ./t/bin/ffmpeg -y -f alsa  -i hw:1 -f v4l2 -vcodec h264  -i /dev/video0 -vcodec copy -strict -2 -acodec aac -f flv
[15:06] <sanooj> + rtmp stream url
[15:06] <emilsedgh> thank you sanooj. let me try.
[15:06] <sanooj> (for values of working with relation to audio. my actual video encoding is a bit iffy still.)
[15:06] <emilsedgh> I appreciate the help
[15:07] <sanooj> I think my audio widget uses a 32kHz sampling rate.
[15:08] <sanooj> maybe I never ran into your problem. but then, I've only butted heads with ffmpeg for a few hours really, so grains of salt etc.
[15:09] <sanooj> so for me the important bit was -acodec aac and -strict -2
[15:09] <emilsedgh> basically the only difference was your audio codec and usage of -strict -2
[15:10] <sanooj> what we said. :)
[15:10] <sanooj> I'm using ffmpeg git master. ymmv.
[15:13] <emilsedgh> im on avconv actually, shipped by debian unstable
[15:14] <sanooj> emilsedgh: so it works for you now?
[15:14] <emilsedgh> no its not. im getting same issues.
[15:15] <emilsedgh> but thanks sanooj. knowing that your example works helps me
[15:15] <sanooj> have you tried -ar 32000 ?
[15:15] <sanooj> erh. -ar 22050
[15:16] <sanooj> I'm streaming to youtube though. these things seem superfinicky.
[15:17] <emilsedgh> no matter what value i set for -ar, i get this: "Option sample_rate not found."
[15:20] <sanooj> are you putting it on your output side or input side?
[15:20] <sanooj> if I put it right before the -acodec aac near the end it works for me.
[15:20] <sanooj> or at least I don't get that message.
[15:21] <sanooj> if I put it on the input side I get your error message.
[15:21] <sanooj> that is, near the front of the command.
[15:21] <emilsedgh> oh ok thanks sanooj
[15:27] <emilsedgh> using exactly your command, i get audio but no video
[15:30] <emilsedgh> sanooj: thanks a lot man. i changed the -vcodec copy to -vcodec libx264 and its now working fine
[15:30] <emilsedgh> \o/
[15:32] <zybi1> hi
[15:33] <zybi1> I would like to know the command to extract audio from mkv-video and resample it to 48khz resulting in flac-format
[15:36] <zybi1> something like ffmpeg -i IN -vn -ar 48000-ac 2 -ab 320k -f flac OUT?
[15:47] <sanooj> emilsedgh: oh yeah, that's totally just for my setup. I'm trying to use a hw encoder.
[15:47] <emilsedgh> sanooj: really thanks for your help.
[15:47] <sanooj> np. :)
[15:54] <sanooj> this does not work?
[16:01] Action: sanooj is confuzzled
[17:11] <AlexRussia> hello
[17:11] <AlexRussia> i've install ffmpeg 2.2.9
[17:11] <AlexRussia> and now i haven't sound in firefox :/
[17:46] <c_14> I'm relatively sure firefox doesn't use ffmpeg...
[18:01] <BtbN> c_14, well, indirectly
[18:01] <BtbN> it uses gstreamer, which in turn uses ffmpeg
[18:02] <c_14> I have firefox withouth gstreamer...
[18:02] <BtbN> You don't have a/v capabilities then.
[18:03] <BtbN> AlexRussia, how did you install ffmpeg? Via your package manager, or just "sudo make install" a version you built?
[18:05] <AlexRussia> BtbN: via emerge
[18:05] <c_14> BtbN: hmm, good point. I never noticed because webms work.
[18:22] <JEEB> yeah, for those libvpx is used internally with a splitter
[20:58] <zybi1> hi
[20:59] <zybi1> what means "[swscaler @ 0x3e2b700] deprecated pixel format used, make sure you did set range correctly"?
[20:59] <zybi1> see also http://www.pasteall.org/54763 please
[21:01] <JEEB> that seems to be an internal warning, because swscale IIRC still uses the "yuvj" colorspace to note PC range from TV range instead of using the range flag
[21:02] <JEEB> and the H.264 decoder sets that one, too
[21:02] <JEEB> it does of course set the flag as well, IIRC
[21:02] <JEEB> so that's not due to your command line
[21:03] <zybi1> so will I get trouble because of that?
[21:03] <JEEB> you shouldn't, although I am not sure how well swscale does the PC->TV range conversion
[21:03] <zybi1> I'm trying to convert mkv (lossless) to apple-compliant file format/compression for a film festival.
[21:04] <JEEB> if the picture looks correct when compared against the input with something like mpv
[21:04] <JEEB> then you should be fine regarding that
[21:04] <JEEB> your input seems PC range and you set the TV range colorspace so it converts (or at least it should)
[21:05] <JEEB> and yes, TV range is correct because PC range is something that you shouldn't generally push out to any player (except those that know how to handle it correctly)
[21:05] <JEEB> the mpv player is one of those that has an opengl video renderer that should handle it correctly
[21:05] <zybi1> or would you suggest another command line to get what I want?
[21:05] <JEEB> not really
[21:05] <zybi1> thanks, yah, fortunately I got to know to mpv-player, and I like the project a lot.
[21:05] <JEEB> the command line looks fine
[21:06] <zybi1> cool
[21:06] <JEEB> well, yeah
[21:06] <JEEB> check in mpv
[21:06] <JEEB> that both look the same
[21:06] <JEEB> as in, color wise
[21:06] <JEEB> so you don't have stuff that should be gray become white
[21:06] <JEEB> and same for black
[21:06] <zybi1> yes ok
[21:06] <JEEB> :)
[21:06] <zybi1> *smile*
[21:08] <JEEB> I remember there were some anime series in Japan that happened to have some part-time worker or someone do the final mastering
[21:08] <JEEB> because someone whoops'd the color range to stay as PC
[21:08] <JEEB> and then that went all the way to the DVDs
[21:09] <JEEB> and nothing that handles broadcasts or DVDs officially does anything out of TV range
[21:09] <JEEB> so those poor bastards who tried to use the media as expected (TVs/DVD players) would get a broken picture with missing things
[21:11] <zybi1> that could've been me, one of these part-time workers..
[21:11] <zybi1> :P
[00:00] --- Sun Oct 26 2014


More information about the Ffmpeg-devel-irc mailing list