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

burek burek021 at gmail.com
Tue Feb 11 02:05:01 CET 2014


[00:45] <roothorick> compiling on Linux amd64, ./configure creates Makefile as a symlink to itself, why?
[04:11] <Thraul> Hi I am trying to use ffmpeg to screen my desktop (including system audio) and webcam (with mic) to twitchtv. I have managed to get a "sorta' working script working but the camera overlay stops due to buffering errors. I am Running Arch Linux. My Script is here - http://pastebin.com/4bufxbmf Command Out and Errors Here - http://pastebin.com/zmRNpuFz any help appreciated.
[04:25] <llogan> Thraul: ffmpeg -f x11grab -video_size 1600x900 -framerate 30 -i :0.0 -f v4l2 -video_size 240x120 -framerate 30 -i /dev/video0 -f alsa -ac 2 -i plughw:0,0 -filter_complex "[0:v]scale=1024:-1,setpts=PTS-STARTPTS[bg];[1:v]setpts=PTS-STARTPTS[fg];[bg][fg]overlay=10:H-h-10,format=yuv420p[out]" -map "[out]" -map 2:a -vcodec libx264 -maxrate 3000k -bufsize 4000k -acodec libmp3lame -ar 44100 -b:a 128k -f flv
[04:25] <llogan> output
[04:30] <Thraul> thanks llogan no buffer error messages :D no dropped frames
[04:30] <Thraul> sweet
[04:31] <llogan> Thraul: where did you find that script?
[04:33] <Thraul> I slapped it together using different scripts I found online. The streaming part worked then found the part about -vf too add a camera to the stream so added it
[04:33] <llogan> i should finish that twitch guide...
[04:34] <llogan> i'll be saying that for 6 months
[04:35] <Thraul> haha
[04:35] <Thraul> camera webcam overlay a little bg trying to reduce it
[04:38] <Thraul> i tried cutting the -video_size 240x120 in half to 120x60 but camera image still the same size :(
[04:39] <llogan> Thraul: you have to see what sizes your webcam supports.
[04:39] <llogan> then you can use the size it provides instead of scaling it
[04:39] <llogan> i forgot to add "-g 2" for your command as an output option
[04:40] <Thraul> the camera is fine just twice the size of what I want lol
[04:41] <Thraul> where add -g 2? before filter_complex?
[04:41] <llogan> ffmpeg -f v4l2 -list_formats all -i /dev/video0
[04:42] <Thraul> [video4linux2,v4l2 @ 0x1738040] Raw       :   yuyv422 :     YUV 4:2:2 (YUYV) : 640x360 320x240 640x480 960x720 1280x720 [video4linux2,v4l2 @ 0x1738040] Compressed:     mjpeg :                MJPEG : 640x360 320x240 640x480 960x720 1280x720
[04:42] <llogan> i'd put it after bufsize for OCD-ness. i like to group options by video, audio, etc.
[04:43] <llogan> don't webcams ouput small sizes anymore?
[04:44] <Thraul> *shrugs* nfi
[04:45] <Thraul> i am also going to push it and say I want a png file to added above the webcam when we get the scale size right :D thanks llogan for the help
[04:45] <llogan> add "-input_format yuyv422" as an input option for your webcam for the big encoding example, then change -video_size to 320x240
[04:45] <llogan> then use "[1:v]scale=120:-1,setpts=PTS-STARTPTS[fg]"
[04:46] <llogan> are you using ffmpeg from Extra?
[04:47] <Thraul> "[0:v]scale=1024:-1,setpts=PTS-STARTPTS[bg];[1:v]setpts=PTS-STARTPTS[fg];[bg][fg]overlay=10:H-h-10,format=yuv420p[out]" so this whole line changes?
[04:47] <Thraul> [moe at marvin ~]$ yaourt -Q ffmpeg extra/ffmpeg 1:2.1.3-1
[04:47] <llogan> you just want to add the scale for the webcam, so the whole filtergraph will look like: "[0:v]scale=1024:-1,setpts=PTS-STARTPTS[bg];[1:v]scale=120:-1,setpts=PTS-STARTPTS[fg];[bg][fg]overlay=10:H-h-10,format=yuv420p[out]"
[04:48] <llogan> Arch does a good job at keeping up and doesn't need no stinkin' forks.
[04:51] <Thraul> thats why i moved from debian to arch to get the upto date and working packages apps lol plus "it works"
[04:51] <llogan> a move that i approve of. anyway, for the logo just add "-i logo.png" or whatever, and then use another overlay filter to place it where you want.
[04:53] <Thraul> ok just tried script again with the new filter you gave me and now getting Option input_format not found.
[04:53] <llogan> you can, of course, omit your API key
[04:54] <Thraul> command and output http://pastebin.com/5NLEBMvY
[04:55] <llogan> you've placed it as an input option for your alsa device.
[04:56] <Thraul> ok moved it to correct place
[04:56] <llogan> my webcam seems to freeze when using "-input_format yuyv422". so you may just remove it anyway.
[04:57] <llogan> oh, mine chooses rawvideo by default instead of mjpeg like i thought it would. i never use these things...
[04:59] <Thraul> bingo thats brilliant
[05:02] <Thraul> ok now just need to install pulseaudio and get that working instead of mucking around and getting alsa to working and audio should be good to go :D
[05:02] <llogan> with the logo: http://pastebin.com/QXLSiGMk
[05:02] <llogan> also see http://ffmpeg.org/ffmpeg-devices.html#pulse-1
[05:04] <Thraul> yeah -f alsa -i pulse :D
[05:04] <llogan> -f pulse -i default
[05:04] <Thraul> oh okies
[05:05] <llogan> see the pulse docs.
[05:05] <llogan> i've got to go now.
[05:06] <Thraul> thanks for help llogan will try the audio and stuff later will let you know how i go. thanks for the help
[08:51] <icedwater> Hi, I understand it's possible to record your desktop using avconv -f alsa -i hw:0,0 -f x11grab -r 15 -s $(xwininfo -root | grep geometry | awk {print $2;}) -i :0.0 -acodec wmav1 -vcodec flv -b:v 16384k output.avi. However, I haven't been able to find the right audio card, is there anyone who has done similar?
[10:01] <relaxed> icedwater: did you look at https://trac.ffmpeg.org/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA  ?
[10:10] <icedwater> Thanks relaxed, checking with arecord -L now.
[10:12] <sacarasc> Also, avconv is from a different project to FFmpeg, you should go to #libav for help with it.
[10:12] <relaxed> icedwater: however, that guide still applies to avconv
[10:14] Action: icedwater nods.
[11:10] <lkiesow> Hey, I've got a question about the blend filter. If I do something like this:
[11:10] <lkiesow> ffmpeg -y -i in.mp4 -i in.mp4 -filter_complex:v '[0:v][1:v] blend=all_expr=0' out.mp4
[11:10] <lkiesow> it will give me a completely green video. Now here are the questions: Why green? How do I get a black image instead?
[11:11] <lkiesow> Of couse, normally the expression for the blend filter is a bit more complicated, but the basic question is the same
[15:48] <sspiff> I'm trying to parse images from AVSubtitleRect's and it works fine on little-endian machines, but it swaps bytes according to a 16bit access pattern on big endian machines.
[15:48] <sspiff> is AVSubtitleRect.pict.data[1] something that should be considered private?
[15:49] <sspiff> is there a better way to read out the data from a subtitle than reading the AVPicture's manually?
[15:49] <sspiff> or is this a bug?
[15:53] <sspiff> the RGBA macro in dvbsubdec.c seems wrong - first in that it generates ARGB, not RGBA, and second in that it doesn't care for endianness at all...
[17:33] <angelosalatino> Good Morning to everyone
[17:33] <angelosalatino> May I ask for some help?
[17:36] <klaxa> don't ask to ask, just ask
[17:37] <angelosalatino> I don't if what I want to do is possible. I'm trying to play (with) ffplay everything is available on my microphone. But when I try to use this command "ffplay -f alsa -i hw:2,0", an error comes out: cannot set channel count to 2 (Invalid argument)
[17:37] <angelosalatino> What I'm looking for is a correct flag to set to 1 channel the input.
[17:38] <lkiesow> Try -ac 1
[17:41] <angelosalatino> @lkiesow like this: ffplay -f alsa -i hw:2,0 "-ac 1" ?? it doesn't work
[17:41] <klaxa> try: ffplay -f alsa -ac 1 -i hw:2,0
[17:43] <angelosalatino> @klaxa it doesn't work. In fact "-ac" is not a flag for ffplay.
[17:43] <klaxa> what version of ffmpeg/ffplay are you using?
[17:45] <angelosalatino> @klaxa ffplay version git-2013-12-18-aeccb52
[17:45] <klaxa> can you pastebin your complete input and output?
[17:45] <angelosalatino> ok
[17:47] <angelosalatino> here you are: http://pastebin.com/LesbegUe
[17:49] <klaxa> i don't know enough about alsa, on my machine it works when i select hw:0 instead of hw:0,2 but that might be completely unrelated
[17:50] <klaxa> what does aplay -L list? can you pastebin that too?
[17:53] <angelosalatino> @klaxa here you are: http://pastebin.com/Gf92jN06
[17:54] <angelosalatino> I choice hw:2,0 because it corresponds to the microphone of my webcam. If I acquire with ffmpeg using that device, it actually records.
[17:55] <klaxa> can you pastebin a ffmpeg example that works with that device?
[17:58] <angelosalatino> @klaxa http://pastebin.com/5CTJPL1M
[18:03] <klaxa> oh can you pastebin arecord -l?
[18:03] <klaxa> that will list all devices that can capture audio, maybe there's something useful in there
[18:04] <angelosalatino> Yes, I know...
[18:05] <angelosalatino> http://pastebin.com/2Fpi7J3a
[18:05] <klaxa> that is weird... well you *could* use pulse instead of alsa
[18:06] <klaxa> that will add the pulseaudio overhead though
[18:06] <klaxa> maybe if you're lucky someone with more alsa knowledge than me reads this
[18:08] <angelosalatino> a command like this: "ffplay -f pulse -i hw:2,0" ?
[18:08] <klaxa> ffplay -f alsa -i pulse
[18:09] <angelosalatino> it works...
[18:22] <dannyzb> Would it make sense to place a GPU on a server to convert both on the GPU and the CPU ?
[19:32] <excalibr> Is it something to be expected that your mkv file would have problem with audio if the original video that you use to mux into mkv has variable bitrate audio?
[19:33] <excalibr> i used -c copy when muxing the vid
[19:46] <excalibr> llogan, ffmpeg -i vidfile.mp4 -map 0:v,:0 -map:a,:1 -c copy vidfile.mkv
[19:48] <llogan> please re-read what fflogger stated
[19:48] <excalibr> well a sec. that needs recreating the mkv to get the output
[19:49] <llogan> you can use the -t option to limit the duration if a short output can also duplicate whatever issue you're experiencing
[19:53] <excalibr> llogan, http://pastebin.com/raw.php?i=tsQKse3S
[19:56] <llogan> excalibr: what's wrong with the output, exactly?
[19:59] <excalibr> llogan, random pause and jump then sometimes player timeslider shows incorrect time
[19:59] <excalibr> that's on computer. and on tv mediaplayer it complains about wrong audio codec
[20:32] <shadowing> would anyone happen to know why encoding an audio file would result in a shorter duration than the raw?
[20:34] <ChocolateArmpits> shadowing, did you set your audio rate ?
[20:37] <ChocolateArmpits> Is it possible to have several concurent multipass encodes done without setting passlogfile or changing directories ?
[20:38] <ChocolateArmpits> concurrent*
[20:42] <shadowing> ChocolateArmpits: that's one possibility
[20:43] <shadowing> I'm not too sure what I should set my audio rate to be in line with the original raw
[20:43] <ChocolateArmpits> What is your audio source?
[20:45] <shadowing> it's an aac-encoded ts file
[20:45] <shadowing> I'm trying to do a 1 to 1 transcode of a video + audio ts
[20:45] <shadowing> except whenever I do it, the video is fine, but the audio is off
[20:46] <shadowing> I've been trying to fix it by demuxing the video and audio
[20:46] <shadowing> transcode both
[20:46] <shadowing> then remux them
[20:46] <shadowing> not entirely working though :/
[20:46] <ChocolateArmpits> Do you have audacity or mediainfo to check sample rate ?
[20:47] <ChocolateArmpits> Or even ffplay
[20:47] <ChocolateArmpits> It should show the sample rate for your file
[20:47] <shadowing> yeah I have mediainfo
[20:47] <shadowing> but it doesn't really tell me the sample rate
[20:47] <shadowing> oh well it does
[20:47] <shadowing> 44100
[20:47] <ChocolateArmpits> The in encoding parameters set "-ar 44100"
[20:48] <ChocolateArmpits> It should then give correct length
[20:48] <ChocolateArmpits> then*
[20:50] <shadowing> let me try that out
[20:50] <shadowing> any other possible routes I should explore if that doesn't pan out?
[20:52] <ChocolateArmpits> Only hard set file limits, like wav not supporting more than about 6 hours of stereo pcm recording
[20:52] <ChocolateArmpits> Don't know of anything else to be honest
[21:00] <shadowing> mm& I tried setting the audio rate
[21:00] <shadowing> so the way I'm testing out whether or not it's working
[21:00] <shadowing> is by first transcoding each individual ts segment
[21:00] <shadowing> than concatenating them together
[21:00] <shadowing> and playing the whole file
[21:01] <shadowing> there's still a definite audio gap at the segment boundary
[21:11] <shadowing> yeah.. it's still weird
[21:11] <shadowing> mediainfo reports the raw duration to be 5s 15ms, but the encoded one is 4s 497ms
[21:11] <shadowing> *969ms
[22:31] <fazer_> hello! i have MOV file without moov atom, but with full data in mdat. so there are video and audio in s8 44800, how to determine what video codec is in use?
[22:32] <fazer_> http://rghost.ru/52344212 - here is a sample, 2MB
[22:43] <Paranoialmaniac> i think it is too difficult to get what codecs are used if the file has no moov atom and does not start from a video chunk
[22:44] <fazer_> i think that it is h264 AVC 4:2:0
[22:45] <fazer_> it must be some variation of this codec, but i don't know how to extract it properly
[22:45] <fazer_> it is corrupted file from cannon 5d mk2 camera.
[22:45] <fazer_> but it differs significantly of working MOV files
[22:46] <fazer_> however, soundtrack format is fully identical. i already implemented sound extractor
[22:47] <fazer_> very intetesting, file share identified this file
[22:49] <fazer_> but it's not correct
[00:00] --- Tue Feb 11 2014


More information about the Ffmpeg-devel-irc mailing list