[Ffmpeg-devel-irc] ffmpeg.log.20130122
burek
burek021 at gmail.com
Wed Jan 23 02:05:02 CET 2013
[00:00] <MachinaeWolf> How would I use ffmpeg to just record sound that is on the system without using a mic?
[00:02] <klaxa> MachinaeWolf: depends on your sound system how ffmpeg would handle that
[00:03] <MachinaeWolf> I have alsa
[00:03] <klaxa> i.e. if you have pulse, set the monitor of your soundcard as recording device for ffmpeg
[00:03] <klaxa> hmm no idea on alsa :V
[00:04] <MachinaeWolf> darn :/
[00:04] <llogan> MachinaeWolf: https://ffmpeg.org/trac/ffmpeg/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA
[00:05] <MachinaeWolf> ooh thanks llogan :)
[00:05] <llogan> lots o' stuff on that wiki
[00:25] <MachinaeWolf> hmm um I followed that guide and I got no sound llogan :/
[00:31] <llogan> MachinaeWolf: then you need to find out if your sound card has an audio loopback device (often called Stereo Mix/Wave out mix/Mono Mix/What U Hear)
[00:31] <llogan> or use a software solution
[00:32] <llogan> open alsamixer and look at what is available to record from
[00:33] <MachinaeWolf> capture tab has mic boost, capture, digital, and internal mic boost
[00:33] <MachinaeWolf> ^ on alsamixer
[00:33] <llogan> maybe it's "capture". is this HDA Intel?
[00:34] <MachinaeWolf> Yep card: HDA Intel PCH Chip: Intel CougarPoint HDMI
[00:34] <MachinaeWolf> well capture was at almost 100%...
[00:35] <llogan> maybe burek can help. i've actually never tried to capture system
[00:35] <llogan> i lied. i did it with pulseaudio once i think
[00:56] <jorge_> Hi, I'm trying to compile ffmpeg with libfaac -- I've used "--prefix=/my/dir" to compile libfaac, but now I get a "libfaac not found" when compiling ffmpeg. I've tried to setup cflags and ldfags to the faac-1.28/libfaac/without success. Any hints?
[01:02] <msmithng> is there anyway for me to cross reference a Lavf version to a git branch revision?
[01:03] <llogan> jorge_: not an answer, but fdk-aac is generally considered better than faac
[02:21] <burek> MachinaeWolf did you solve your problem
[02:41] <MachinaeWolf> nope burek
[02:41] <MachinaeWolf> sorry I was doing some stuff for a while
[02:49] <burek> can you type: arecord -L
[02:49] <burek> and copy the output to a pastebin-like site (like www.pastebin.com)
[02:50] <MachinaeWolf> sure hold on
[02:51] <MachinaeWolf> http://pastebin.com/GHJcjffE
[02:53] <burek> oj
[02:53] <burek> ok
[02:53] <burek> did you try typing alsamixer
[02:53] <burek> and pressing <tab>
[02:53] <burek> to switch to recording devices
[02:53] <burek> also F6 to choose audio card (if you have multiple installed)
[02:54] <MachinaeWolf> yeah it's capture devices
[02:54] <_numbers> does ffmpeg use -preset and -vprofile or does it just pass those to x264?
[02:55] <burek> can you printscreen it?
[02:55] <MachinaeWolf> sure burek
[02:55] <burek> _numbers, passes to libx264
[02:55] <burek> you can also use -x264opt
[02:55] <MachinaeWolf> burek, http://db.tt/OKpzq9EU
[02:56] <_numbers> is it better to specify things like -preset, -vprofile, -maxrate, -bufsize or can i just use --x264opt
[02:56] <_numbers> with profile=high:preset=veryslow:tune=film:vbv-maxrate=364:vbv-bufsize:182
[02:56] <burek> MachinaeWolf, you have more devices on the left
[02:56] <burek> _numbers it depends on what you want
[02:57] <_numbers> i mean does ffmpeg use them or just pass 100% to x264
[02:57] <MachinaeWolf> No that's all of them on the capture tab burek
[02:57] <burek> also, no need to touch -profile (unless you really know what you are doing), since it is automatically selected based on your image size
[02:58] <burek> MachinaeWolf, you might be better of buying a cheap audio card
[02:58] <burek> this one is like 5$ card
[02:58] <burek> it doesn't even have standard controls
[02:58] <MachinaeWolf> well sound works I just can't get ffmpeg to record it from it
[02:58] <burek> well ok
[02:59] <MachinaeWolf> Would pulse maybe work? Distro had alsa and pulse installed, though I prefer alsa
[03:00] <burek> you can always test and see
[03:00] <MachinaeWolf> k
[03:04] <MachinaeWolf> Is the syntax ffmpeg -f pulse -i hw:0 filename.wav for pulse?
[03:25] <_numbers> does this seem valid: ffmpeg -i hq.mp4 -ss 00:00:30.0 -t 00:00:10.0 -threads 4 -f mp4 -vcodec libx264 -acodec libfdk_aac --x264opts profile=high:preset=veryslow:tune=film:level=3.1:pass=1:crop=1,1,1,1:resize:width=679,height=288,csp=yv12,method=bicubic:fps=10:crf=18:vbv-maxrate=300:vbv-bufsize=3000 -ac 1 -ar 22050 -ab 32k v35.mp4
[03:25] <_numbers> i am passing all the video-related options i can directly thru --x264opts instead of using the ffmpeg pseudo-options
[03:26] <MachinaeWolf> burek, Is the syntax ffmpeg -f pulse -i hw:0 filename.wav for pulse?
[03:27] <burek> _numbers, test and see if it is
[03:28] <burek> usual way to do that is: ffmpeg ... -profile:v ... -preset:v ... -tune:v ... -level ... etc.
[03:28] <burek> MachinaeWolf yes
[03:28] <MachinaeWolf> hmm well that didn't work ?_?
[03:28] <burek> but not -i hw:0
[03:28] <burek> read the manual
[03:28] <burek> hw:0 is alsa's thing
[03:28] <MachinaeWolf> oh
[03:29] <_numbers> [libx264 @ 0x2dd7b80] bad option 'profile': 'high'
[03:29] <_numbers> i guess that is one that cannot be passed through x264opts
[03:29] <burek> MachinaeWolf try ffmpeg -f alsa -i pulse
[03:29] <burek> _numbers, one stupid question
[03:29] <burek> why would you want to do that
[03:29] <burek> if there is -profile ffmpeg option?
[03:30] <_numbers> its just confusing to memorize two options by different names, when ffmpeg doesn't seem to do anything with it
[03:30] <_numbers> one option by two different names*
[03:30] <burek> well, x264 is usually used by experts (people that know what they are doing and why)
[03:30] <burek> to set some advanced x264 options
[03:31] <burek> most people need only -c:v libx264 -preset ... -crf ... output
[03:31] <_numbers> ya i'm trying to stream the video tho so i need control over bitrate
[03:31] <burek> what's wrong with -b:v and -maxrate
[03:31] <MachinaeWolf> burek, that command worked but still no sound on the file :(
[03:32] <burek> MachinaeWolf, sorry, I can't help anymore since I never use pulse
[03:32] <_numbers> well i dont want CBR which is what -b:v is. i want VBR specifically CRF
[03:32] <_numbers> so crf=18 is one option i must pass to x264
[03:33] <klaxa> crf 18 for streaming?
[03:33] <_numbers> and then -maxrate is renamed x264 option vbv_maxrate
[03:33] <klaxa> lan or...?
[03:33] <_numbers> klaxa: its a good q. i havent gotten far enough to find out what crf is going to be acceptable. i guess that seems high?
[03:33] <_numbers> its just over regular cable modem from aws ec2
[03:34] <klaxa> well depends on how compressed the video will get, i.e. how slow you can encode for it to still be realtime
[03:34] <klaxa> if you encode with fast preset, bitrate will be high for crf 18
[03:34] <_numbers> https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping
[03:35] <_numbers> i'm using veryslow. u can see my exact command above
[03:35] <_numbers> i am gonig for 500k bitrate, 944x400 (non-standard) high resolution, and super-low 10fps framerate, and willing to compromise on RF
[03:36] <klaxa> <_numbers> i guess that is one that cannot be passed through x264opts <-- pretty much this
[03:36] <klaxa> that may work with Handbrake, but not with ffmpeg :P
[03:36] <_numbers> the video is more like a 2 hour powerpoint presentation with a few <5min stock videos sprinkled inbetween
[03:36] <_numbers> ya i am coming from handbrake gui
[03:36] <klaxa> ffmpeg can do the resizing instead of libx264
[03:36] <_numbers> because it ignored my VBV settigs
[03:36] <klaxa> same goes for cropping i think
[03:37] <MachinaeWolf> ooh searched up a bit and I got it
[03:37] <burek> _numbers use -crf
[03:37] <klaxa> colorspace conversion will be forced automatically, fps can be set too by ffmpeg
[03:37] <MachinaeWolf> records with the pulse in the command after I messed with pavcontrol
[03:37] <MachinaeWolf> pavucontrol*
[03:38] <burek> also
[03:38] <_numbers> i'm sure almost all the options can be done by ffmpeg, but which will be better to ask for the task? ffmpeg or x264
[03:38] <burek> using -preset veryslow will not help in live stream
[03:38] <burek> but, you'll figure that out sooner or later
[03:38] <burek> when you start testing
[03:38] <klaxa> lol MachinaeWolf: i think i said what to do a few hours ago :P
[03:38] <MachinaeWolf> Hmm must've not been around then
[03:38] <klaxa> oh wait
[03:39] <klaxa> you said back then you wanted to use alsa
[03:39] <MachinaeWolf> yeah
[03:39] <klaxa> <klaxa> i.e. if you have pulse, set the monitor of your soundcard as recording device for ffmpeg
[03:39] <MachinaeWolf> don't know why alsa doesn't work for ffmpeg to record it
[03:39] <burek> <_numbers> i'm sure almost all the options can be done by ffmpeg, but which will be better to ask for the task? ffmpeg or x264 :)
[03:39] <burek> really?
[03:39] <klaxa> either specify monitor of your soundcard as default, or set it after the ffmpeg record sink has been instantiated
[03:39] <_numbers> burek: what preset would you recommend for streaming? i thought it only had to do with compression/encoding effectiveness, and not really much to do with bitrate ? perhaps you mean it will raise client-side/player decoding cpu requirements?
[03:40] <burek> didn't we just tell you that ffmpeg just passes those options directly to libx264?
[03:40] <_numbers> burek: ok right so why do i care to give them to ffmpeg at all, except for the ones that i have to because --x264opts wont accept it there
[03:41] <burek> _numbers, -preset will slow down your cpu and utilize more ram memory
[03:41] <burek> if you don't have a very good cpu, then you'll have dropped frames
[03:41] <_numbers> so in that case i want ultrafast probably
[03:41] <burek> and bigger latency
[03:41] <_numbers> or zerolatency?
[03:41] <burek> also, if you use -maxrate, there is no point in using -crf
[03:42] <_numbers> i've had ppl tell me crf is compatible with maxrate
[03:42] <burek> there are 3 things you can optimize on, but usually 2 of them can go together at the same time: speed of encoding, image quality and output file size
[03:43] <_numbers> basically 95% of my 2hr video is still frames, but a few (maybe 6) scenes (less than 5min each) are action scenes, so thats the only time i need bitrate to ramp up
[03:43] <_numbers> but even then it shouldn't exceed a maximum cap of like 500kbps
[03:43] <burek> hmh
[03:43] <burek> how is a 2hr video a live streaming?
[03:43] <_numbers> its got audio that is mostly talking
[03:44] <_numbers> its educational material
[03:44] <burek> if you have your material already prerecorded :)
[03:44] <burek> that's not live streaming then
[03:44] <_numbers> no its VOD
[03:44] <_numbers> still streaming
[03:44] <burek> too much confusion right here :)
[03:44] <_numbers> i'm using RTMP and flash player in browser
[03:44] <burek> just use 2-pass encoding then
[03:44] <burek> and you'll be fine
[03:44] <burek> live streaming is when you stream some live events
[03:45] <burek> not a vob (or any other) file from your hdd
[03:45] <_numbers> right i know. i never used 'live' word ;)
[03:45] <burek> ok
[03:46] <_numbers> when i say 'streaming' i mean rtmp. its NOT the pseudo-streaming mp4 with qt-faststart
[03:46] <_numbers> so i can afford a veryslow profile for encoding then right? because its just one-time
[03:46] <_numbers> as long as it doesn't negatively impact decoding, then its fine i think
[03:48] <jbermudes> I'm trying to run: ffmpeg -y -f video4linux2 -i /dev/video0 -f jack -ac 1 -i ffmpeg_1 -f jack -ac 1 -i ffmpeg_2 -map 0 -map 1 -map 2 test.mp4
[03:48] <jbermudes> In order to end up with 2 audio tracks each with 1 channel, but I still end up with each audio track having 2 channels
[03:49] <burek> _numbers, 2-pass will help you if you are targetting a specific bitrate
[03:49] <_numbers> but is 2-pass valid with crf?
[03:50] <burek> 1st pass will analyze the video and 2-pass will encode various parts of the video using different encoding params
[03:50] <burek> no
[03:50] <burek> crf will optimize the image quality
[03:50] <burek> nothing to do with the bitrate
[03:50] <burek> jbermudes, you need to use audio filter for that
[03:50] <burek> I think it's amix or amerge
[03:51] <burek> hmh
[03:51] <burek> it seems that wiki has better SEO than a main website :/
[03:52] <burek> https://ffmpeg.org/ffmpeg-filters.html#amerge
[03:52] <burek> jbermudes <-
[03:59] <jbermudes> burek: Hmm, but if that's the case, then why do tutorials suggest -ac 1 for the simple case of converting a stereo mp3 to mono? I thought ac operaters on the input to mixdown
[04:02] <burek> jbermudes which tutorials?
[04:04] <jbermudes> burek: Well, like for instance: http://howto-pages.org/ffmpeg/ (Ctrl+F for 'to mono')
[04:05] <jbermudes> does -ac only operate on the output file?
[04:07] <burek> oh man..
[04:07] <burek> first of all
[04:07] <burek> howto-pages.org is not ffmpeg.org
[04:07] <burek> we've got our own tutorials on our wiki
[04:08] <burek> next, you are not following that tutorial correctly
[04:08] <burek> look where is your "-ac" and where is it in that tutorial
[04:08] <burek> yours is before -i, making it input option
[04:09] <burek> if you put it after -i, it will be considered as output option
[04:09] <burek> thus, mixing it down to mono
[04:10] <_numbers> is -an necessary ?
[04:10] <burek> ffmpeg -y -f video4linux2 -i /dev/video0 -f jack -i ffmpeg_1 -f jack -i ffmpeg_2 -map 0 -map 1 -map 2 -ac 1 test.mp4
[04:10] <burek> try that
[04:11] <burek> -an means "no audio"... it will mute your input/output
[04:20] <_numbers> ffmpeg -i hq.mp4 -ss 00:00:30.0 -t 00:00:10.0 -threads 4 -f mp4 -vcodec libx264 -pass 1 -profile:v high -preset veryslow -tune film -level 3.1 -s 604x256 -r 10 -crf 18 -maxrate 300k -bufsize 3000k -acodec libfdk_aac -ac 1 -ar 22050 -ab 32k v35.mp4
[04:20] <_numbers> i tried to say audio codec should be mono, but its coming out stereo
[04:21] <_numbers> also the audio freq and bitrate didnt apply either
[04:23] <_numbers> do i need -vcodec copy -ac1 ?
[04:24] <_numbers> hm no -ac 1 should work right
[04:27] <_numbers> Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 32 kb/s
[04:28] <_numbers> strange that vlc thinks its stereo 44hz
[04:31] <_numbers> when i tell ffmpeg -ss 00:59:42.8 -t 00:00:55.3 it takes forever to reach that point. is that normal?
[04:31] <_numbers> i see this for a long time: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A
[04:37] <burek> as usual
[04:43] <_numbers> burek: http://www.hastebin.com/puwobihugo.sm
[04:46] <_numbers> heres plain text version that doesnt get cut off http://www.hastebin.com/raw/puwobihugo
[04:47] <Zeranoe1> _numbers: Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, mono, s16, 32 kb/s
[04:47] <_numbers> correct thats what i pasted above
[04:48] <_numbers> but vlc doesn't report that
[04:48] <_numbers> is there a 2nd opinion i can get somehow?
[04:48] <Zeranoe1> _numbers: Are you on Linux?
[04:48] <_numbers> ya
[04:48] <Zeranoe1> _numbers: mediainfo is an option, or ffprobe
[04:48] <beware> can ffmpeg remux an avi and remove junk chunks?
[04:49] <beware> i find that when i encode an avi with it, by default, it introduces junk chunks. and mencoder does, too
[04:49] <Zeranoe1> beware: Junk chunks?
[04:49] <beware> they are chunks, that are added to the begin of the file and make it bigger
[04:49] <beware> in the avi standard, "junk" are chunks without meaning
[04:50] <burek> why avi
[04:50] <Zeranoe1> beware: When doing -c:a copy and -c:v copy are they also copied?
[04:50] <beware> burek: compatibility with something, specific needs
[04:52] <_numbers> Zeranoe1: ya ffprobe reports it correctly Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 32 kb/s
[04:52] <beware> let's see
[04:52] <beware> yes they are
[04:52] <beware> well,
[04:52] <beware> ffmpeg omits the original junk chunks, but introduces it's own which are bigger still
[04:52] <Zeranoe1> Zeranoe1: I would trust that
[04:53] <beware> mencoder's are about 4 kb, ffmpeg's 6 kb
[04:53] <_numbers> how can i tell ffmpeg to use the yuv420p color profile for video?
[04:54] <Zeranoe1> _numbers: -pix_fmt right?
[04:55] <Zeranoe1> _numbers: Available options is -pix_fmts
[05:00] <_numbers> if i want to crop AND resize/scale is it important where i specify the -vf? e.g. before or after -s ? and am i cropping the input dimensions, or the output dimensions?
[05:04] <llogan> why would you use -s and scale?
[05:04] <llogan> one will be ignored
[05:04] <_numbers> i'm only using -s
[05:04] <_numbers> i assumed it meant -scale
[05:05] <_numbers> the input file is a 944x400 resolution
[05:05] <llogan> makes more sense to use scale if you're cropping to keep it all within a filterchain
[05:05] <_numbers> and i specify size of -s 604x256
[05:05] <_numbers> ah ok . so i want to crop 1px off each side before scaling
[05:06] <_numbers> http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide
[05:08] <llogan> -vf crop=iw-2:ih-2,scale....
[05:11] <_numbers> thx
[05:11] <_numbers> [libx264 @ 0x245ff40] constant rate-factor is incompatible with 2pass.
[05:11] <_numbers> argh
[05:12] <llogan> what are you trying to do?
[05:13] <_numbers> was seeing if CRF would get more efficient at staying within -maxrate
[05:17] <_numbers> "CRF in streaming can be thought of as a more advanced "min QP" where the codec won't waste bits improving quality beyond a certain threshold. You'd then set the peak bitrate and VBV to whatever the max you want for your stream to be. Peak is really what matters in streaming for compatibility and support."
[05:18] <_numbers> anyone understand which ffmpeg options he's referring to?
[05:18] <llogan> who is "he"?
[05:18] <llogan> maxrate and bufsize probably
[05:20] <llogan> bufsize/maxrate = latency in seconds
[05:20] <llogan> typical bufsizes are 1-5 seconds
[05:21] <llogan> probably
[05:21] <_numbers> he = benwaggoner from http://forum.doom9.org/archive/index.php/t-163968.html
[05:21] <_numbers> i can't get this 55sec video clip to stream over rtmp without stuttering
[05:23] <llogan> your maxrate should exceed your minimum connection speed
[05:24] <_numbers> see here http://bit.ly/10KRXub (click in the "Filename" box then click away to trigger onblur which starts that video)
[05:24] <llogan> ignore that
[05:25] <llogan> your maxrate determines the minimum connection speed that you want to support
[05:25] <_numbers> i have: -s 674x286 -r 8 -crf 16 -maxrate 300k -bufsize 150k -ac 1 -ar 22050 -ab 32k
[05:26] <_numbers> ffprobe says the output file is Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 674x286 [SAR 703:702 DAR 236911:100386], 1327 kb/s, SAR 8437:8425 DAR 59:25, 8 fps, 8 tbr, 16384 tbn, 16 tbc
[05:26] <_numbers> notice the 1.327mbps bitrate!?
[05:27] <_numbers> sry disregard, i probed wrong file
[05:27] <_numbers> its Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 674x286 [SAR 703:702 DAR 236911:100386], 182 kb/s, SAR 8437:8425 DAR 59:25, 8 fps, 8 tbr, 16384 tbn, 16 tbc
[05:27] <_numbers> 182kbps is more realistic
[05:27] <_numbers> but i cant figure out why it stutters during flash player playback
[05:27] <_numbers> over rtmp
[05:41] <llogan> _numbers: you can use crf in your first pass as a "test" to determine a certain quality. when it's done encoding it will tell you the average bitrate. if the average bitrate is lower than your desired limit, then you know you won't be wasting bits by declaring a certain bitrate with -b:v instead.
[05:41] <llogan> if it's over, then just use -b:v
[05:42] <llogan> i mean just use your max allowed bitrate with -b:v
[05:42] Action: llogan is sucking at communicating tonight
[05:42] <llogan> this scotch is from 1989
[05:46] <llogan> if your limit is 300k and -crf 24 is "good enough" and under 300k, then in your second pass, use whatever bitrate -crf 24 gives you instead of using -b:v 300k.
[05:49] <_numbers> hm ok will try
[05:51] <Fjorgynn> Good morning
[06:33] <_numbers> what does that 'Format for web" option do? what is the cli equivalent?
[06:33] <_numbers> sry meant for #handbrake
[07:30] <_numbers> is there a way to tell ffmpeg to guess the ETA while its encoding?
[07:43] <llogan> _numbers: you could watch "time=" and infer from there i guess
[07:43] <_numbers> easier to watch frames since time varies by encoding settings
[08:27] <kcm1700> CODEC_ID_RAWVIDEO <- what is the purpose of it?
[08:28] <kcm1700> does it actually create a dummy codec?
[10:41] <Abhijit> hi
[10:42] <Abhijit> May I ask if I can hire someone with ffmpeg knowledge ?
[11:13] <burek> Abhijit, did you check consulting page
[11:13] <burek> https://ffmpeg.org/consulting.html
[11:15] <Abhijit> nope. let me check. thanks for the link burek
[11:31] <simonec77> Hi, it is possible to biuld FFMPEG libs (libavcodec, libavfilter and so on) in debug mode for MSVC?
[11:32] <simonec77> I have already follewed instruction at:http://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b
[11:33] <simonec77> but when I put the dll, and the .lib in my MSVC project
[11:33] <simonec77> and try to Degug
[11:34] <simonec77> the Output Window say:"Binary was not built with debug information"..
[14:36] <kode54> <DEATH> ffmpeg yadif outputs half the rate by default
[14:36] <kode54> <DEATH> Only SOMEHOW MPC-HC would claim the files were still full rate when outputting Matroska
[14:36] <kode54> <DEATH> But stepping frame by frame and counting revealed 25FPS
[14:36] <kode54> <DEATH> And remux to MP4 made MPC-HC show correct rate
[14:36] <kode54> <Case> ctrl-J should show stats that tell realtime values too
[14:36] <kode54> <DEATH> So ffmpeg muxes Matroska with nonsense info when usign yadif in default mode
[14:43] <relaxed> The default is one frame per frame, not per field.
[14:43] <relaxed> What does mediainfo report?
[14:45] <relaxed> or mkvinfo
[14:47] <durandal_1707> mediainfo is banned
[14:47] <relaxed> says who?
[14:59] <suzaru> im trying to join 2 aac files with latest ffmpeg. the result from the cmd i use is just the first aac file
[14:59] <suzaru> ffmpeg -i "concat:1_Output.m4a|2_Output.m4a" -c copy -absf aac_adtstoasc out.m4a
[14:59] <suzaru> is there something else i should try?
[15:00] <Mavrik> kode54: have you tried forcing fps with "-r 25" to ensure correct metadata?
[15:00] <kode54> I'll tell him that
[15:00] <kode54> although he would prefer that it perform frame doubling instead
[15:00] <suzaru> i also tried: ffmpeg -i "concat:1_Output.m4a|2_Output.m4a" -acodec copy -absf aac_adtstoasc out.m4a
[15:01] <suzaru> same result
[15:02] <suzaru> any suggestions appreciated =}
[15:08] <suzaru> i noticed joining crf encoded mp4 files it results in vfr result. even when using "-r #"
[15:09] <suzaru> any ideas to preserve cfr frame rate mode?
[15:10] <suzaru> both mp4 files had identical frame rate of 25 and constant frame rate mode. each frame was unique in each respective source
[15:12] <relaxed> suzaru: demux aac from the mp4 and concat with mkvmerge
[15:13] <suzaru> it's actually m4a
[15:13] <suzaru> so demuxed already
[15:13] <relaxed> m4a is mp4
[15:13] <relaxed> So, it's not demuxed
[15:13] <suzaru> how do i demux it?
[15:13] <suzaru> someone told me to try demuxing it before. he didn't have any idea how to
[15:14] <suzaru> he only had mkvextract as a suggestion to demux but it doesn't work on m4a (just mkv i'm guessing)
[15:14] <Mavrik> yeah, mp4 (m4a) really can't be concatenated easly
[15:15] <relaxed> ffmpeg -i blah.m4a -c:a copy -bsf:a aac_adtstoasc demuxed.aac
[15:15] <Mavrik> do "ffmpeg -i <your>.m4a -codec copy <your>.mkv" to remux it to mkv
[15:15] <Mavrik> then concat it with mkvmerge
[15:15] <Mavrik> :)
[15:15] <Mavrik> you can remux it back to m4a again afterwards
[15:18] <suzaru> neat. lol.. i was able to demux it to .aac. gonna install mkvmerge so i can concat
[15:18] <suzaru> how to mux it back to m4a ?
[15:18] <suzaru> remux*
[15:18] <Mavrik> just wap parameters :)
[15:18] <Mavrik> *swap
[15:19] <Mavrik> ffmpeg -i demuxed.aac -c:a copy blah.m4a
[15:19] <suzaru> thanks
[15:23] <suzaru> out of curiousity is the mkvmerge step needed? i did concat on the .aac and i think it worked
[15:24] <suzaru> run time/size looked right
[15:25] <suzaru> yeah runtime is perfect
[15:25] <suzaru> on the output
[15:34] <suzaru> can i change Format profile : Apple audio with iTunes info to Format profile : Base Media / Version 2?
[15:34] <suzaru> what it was before
[15:34] <suzaru> for the new m4a
[16:15] <microchip_> how can i set the quantizer used for b-frames?
[17:12] <jeje632> hi to all
[17:13] <jeje632> I'm facing a problem using FFMPEG avdecode_video2 and swscale to decode a H264 video stream from a camera
[17:13] <jeje632> depending the resolution it work well or not
[17:14] <jeje632> if I set the camera to 720*288 or 720*576 it doesn't dsiplay well
[17:14] <jeje632> look like a stride problem
[17:14] <jeje632> if someone can help me please
[17:15] <durandal_1707> jeje840: pastebin code
[17:16] <jeje840> I think the problem is just to using swscale to convert from YUV420 to RGB32
[17:16] <durandal_1707> swscale converts fine
[17:17] <jeje840> after the decompression, I have my AVFrame* m_lpFrame
[17:17] <jeje840> I try to set the linesize by this
[17:17] Last message repeated 1 time(s).
[17:17] <jeje840> m_lpFrame->linesize[0] = dwWidth+32;
[17:17] <jeje840> m_lpFrame->linesize[1] = m_lpFrame->linesize[0]/2;
[17:17] <jeje840> m_lpFrame->linesize[2] = m_lpFrame->linesize[0]/2;
[17:18] <jeje840> where dwWidth is equal to 720
[17:18] <durandal_1707> hmm, you are supposed to modify linesize/
[17:20] <jeje840> I do this before passing to the function
[17:20] <jeje840> img_convert( AVPicture* dst, PixelFormat dst_pix_fmt, int dstWidth, int dstHeight, AVPicture* src, PixelFormat src_pix_fmt, int srcWidth, int srcHeight, DWORD dwStride)
[17:20] <jeje840> and in this one I do
[17:20] <jeje840> if (dst->linesize[0] == 0) dst->linesize[0] = dwStride;
[17:20] <durandal_1707> do you really need to set linesize, there are tools that do that for you....
[17:21] <jeje840> I don"t know what tools I need to use
[17:21] <jeje840> are you speaking about ffmpeg function?
[17:25] <durandal_1707> av_image_fill_linesizes
[17:25] <jeje840> I use swscale to directly convert in a DirectDraw surface
[17:26] <jeje840> I suppose I need to use this function instead of my manual linesize values set
[17:34] <jeje840> I just have to do
[17:34] <jeje840> av_image_fill_linesizes(m_lpFrame->linesize, PIX_FMT_YUV420P,dwWidth);
[17:34] <jeje840> isn't it?
[17:50] <jeje840> When I try the av_image_fill_linesizes with the real value of the width video entry, it doesn't work even for other resolution working before
[17:50] <Zeeflo> This is when I run FFmpeg: http://pastebin.com/qvt7ZzPj
[17:50] <jeje840> if I want it work like before, I'm always need to add 32 to the real width
[17:50] <jeje840> and it still doesn't work with a width of 720
[17:51] <Zeeflo> And this is what happens: http://pastebin.com/etVjZWeP ? Whats going on?
[17:53] <jeje840> I think there soething wrong when my video width isn't modulo 32
[17:55] <durandal_1707> jeje840: your buffers should be padded
[17:55] <Mavrik> and aligned.
[18:00] <jeje840> could you please check this part of code because I don't see where is the problem
[18:00] <jeje840> http://pastebin.com/2cHu3fKk
[18:01] <jeje840> thank you very much
[18:03] <BtbN> Hi. When playing/decoding my h264 video, i get some "[h264 @ 0x7f3604c938c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one" errors.
[18:04] <BtbN> I'm trying to fix my encoder, but i can't realy find what i did wrong, does anyone know what might be causing this?
[18:04] <BtbN> It started after i added more than one idr frame
[18:04] <BtbN> before i just had exactly one idr frame in the beginning, what made the stream unseekable
[18:05] <Mavrik> BtbN: that's a message from the decoder, not encoder
[18:05] <Mavrik> check your input
[18:05] <BtbN> Mavrik: sure it is, that what i'm ascing
[18:05] <BtbN> i wrote the encoder
[18:05] <BtbN> and i'd like to know what i'm doing wrong
[18:06] <Mavrik> you're creating too many B-frames per GOP
[18:06] <jeje840> when you say: buffer need to be padded (and aligned), you tell me this about the input buffer (before calling avdecode_video2) or the result of the decoding (the AVFrame)?
[18:07] <BtbN> I don't create any B-Frames. Just I and P for the moment
[18:07] <Mavrik> which level/profile are you targeting?
[18:07] <BtbN> High, level 3.1
[18:10] <BtbN> http://btbn.de/files/testout.mp4 here's a sample output which has the problem.
[18:11] <Mavrik> hmm
[18:11] <Mavrik> it seems number of reference frames is written into the stream
[18:11] <Mavrik> check h264_ps.c file in the decoder to see how it's set
[18:13] <BtbN> the maximum number is written, yes. I set it to 4. Or is there something else? From my look at h264_refs.c it seems like i have to issue a "MMCO_RESET" or something similar. But no idea how
[18:14] <Mavrik> why don't you trace through the code with a debugger? :)
[18:16] <BtbN> cause i don't realy know what i'm looking for. I looked at the bitstream output from x264, it also uses a max_num_ref_frames value of 4, ans also has multiple idr frames. But i don't see what it does to avoid filling up the reference buffer
[18:18] <jeje840> about your answer, are you telling me to add FF_INPUT_BUFFER_PADDING_SIZE to the packet data before call avcodec_decodevideo2? I try it but no change make
[18:21] <yermandu> hi deers : >
[19:01] <Fjorgynn> Vad är detta?
[19:04] <juanmabc> :O
[19:05] <Fjorgynn> Wrong channel
[19:05] <Fjorgynn> it is
[20:27] <blue_misfit> Hello folks - is there a way to determine the starting GOP timecode of an MPEG-2 video stored in MPEG-PS using ffmpeg?
[20:27] <blue_misfit> I can get this info by demuxing and using a stream analyzer like Manzanita, but haven't been able to do it via simple ffprobe or ffmpeg -i
[20:27] <saste> blue_misfit, ffmpeg -show_packets / -show_frames
[20:27] <saste> ehm ffprobe
[20:28] <blue_misfit> nice
[20:28] <blue_misfit> hmm
[20:29] <blue_misfit> show_frames seems to give me lots of useful information including pts/dts
[20:29] <blue_misfit> but I'm looking specifically for the GOP timecodes
[20:29] <blue_misfit> which are something different AFAIK
[20:31] <saste> blue_misfit, -show_entries frame=pict_type,pts_time,pts
[20:31] <saste> i don't know what you mean by "GOP timecodes"
[20:34] <blue_misfit> apparently it's a "thing" involving storing standard HH:MM:SS:FF timecodes in the GOP headers, but I don't know more than that
[20:35] <saste> blue_misfit, we have support for timecode display, but can't say much more than that
[20:40] <JEEB> sounds like SMPTE time codes
[20:40] <JEEB> in theory with the frame count and PTS you could create the smpte timecode of a frame
[20:41] <blue_misfit> JEEB: sure that makes sense, but wouldn't you have to assume what the starting timecode of a given stream would be then?
[20:41] <JEEB> aye
[20:41] <blue_misfit> that's the problem :)
[20:41] <JEEB> if you have a nonzero start point, then you'll have fun
[20:41] <blue_misfit> I've got a bunch of files, some start at hour 00
[20:41] <blue_misfit> some start at hour 01
[20:41] <blue_misfit> welcome to broadcast <herpderp>
[20:41] <JEEB> I guess kierank or someone who is close to broadcast should be able to answer some questions :S
[20:42] <blue_misfit> Yep. I'm whining in #ffmbc
[20:42] <JEEB> but I'd guess ffmpeg/ffprobe out-of-the-box aren't capable of showing those timecodes
[20:42] <blue_misfit> indeed. ffmbc can do this for MOV and MXF
[20:42] <blue_misfit> I'm hoping there's some super secret way to do this for MPEG-PS
[20:42] <JEEB> most probably not :P
[20:43] <JEEB> which means om nom nom parsing code needed
[20:43] <blue_misfit> dreadful
[20:44] <blue_misfit> yeah I can do this with Elecard / Manzanita, but blech
[22:15] <RobertNagy> is there any difference quality wise between deinterlacing RGB or YUV, i.e. is YUV->Deinterlace->RGB == YUV->RGB->Deinterlace?e
[22:16] <Holden> Hello guys, can anyone tell me why I can't seem to open my tv card with ffplay? http://paste.ubuntu.com/1560780/
[22:24] <burek> Holden, did you try: vlc v4l2:///dev/video0
[22:25] <Holden> burek, hmm, no, I do not have vlc installed atm, but I know for sure the tv card it's working (at least it works with mplayer and my own program)... I am noticing now that ffplay works with the webcam, but not with the tv card...
[22:26] <burek> hm, i havent used any tv cards with v4l so far..
[22:29] <Holden> this is strange... I'm fairly sure it use to work... it can list available formats okay, but it just hangs without an error or an hint on what it might be wrong
[22:31] <saste> Holden, latest version?
[22:31] <Holden> saste, yep, compiled two hours ago
[22:33] <saste> Holden, can you try this patch and see if it improves the feedback?
[22:33] <saste> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/157567/focus=157961
[22:33] <saste> even if i suspect the problem is unrelated
[22:35] <llogan> saste: what does enabling libv4l2/v4l-utils provide that native doesn't?
[22:35] <Holden> saste, sure, I can test it...
[22:35] <saste> llogan, i don't know, i never understood that...
[22:36] <llogan> at least you're not alone
[22:36] <Holden> saste, also running ffmpeg like this http://paste.ubuntu.com/1560841/ I get a 100% cpu usage, and after pressing ctrl-c (line 33) I get all that
[22:36] <saste> llogan, it's useful if you don't have libswscale I suppose
[22:37] <saste> or for testing libv4l2 issues/comparing it with libswscale
[22:37] <saste> but i might be totally wrong
[22:38] <saste> the rfps spam is annoying...
[22:38] <saste> Holden, that's the fun of v4l2, it's hard to debug/reproduce
[22:41] <Holden> saste, I hear you... ok, trying your patch now... just one thing I noticed: the doc says "-channel <int> .D.... set TV channel, used only by frame grabber (from 0 to INT_MAX)" but I think 'channel' is misleading, it should be 'input', because looking at the code what it does is setting the input: input.index = s->channel; v4l2_ioctl(s->fd, VIDIOC_S_INPUT, &input.index);
[22:43] <saste> Holden, "channel" (given it's a TV grab) sounds better than "input", too generic, input index would be fine too
[22:49] <Holden> saste, yes, input index would be better imo, channels makes me think of a...well tv channel. ok, patch applied, nothing really changed: http://paste.ubuntu.com/1560869/ :(
[22:56] <burek> llogan, v4l-utils are used at cmd line to set some "defaults" for the device or to change some parameters while capturing the video, like brightness, zoom, contrast, etc
[22:56] <burek> i can only imagine that libv4l2/v4l-utils is a wrapper for that
[22:59] <burek> Holden, can you type: v4l-ctl --list-formats-ext
[22:59] <burek> and copy the output to a pastebin-like site (like www.pastebin.com)
[23:00] <saste> burek, well libv4l is a lib, v4l-utils is an utility controlling the v4l2 device settings (which are persistent across device usage sessions)
[23:00] <saste> in theory we could extend v4l2 to make it set the other options
[23:00] <burek> not all of them
[23:00] <Holden> burek, it does not seem to find that command http://paste.ubuntu.com/1560902/
[23:00] <saste> but since different driver may support different options, this may be difficult
[23:01] <burek> Holden, apt-get install v4l-utils
[23:01] <saste> Holden, and yes setting a specific input may help
[23:01] <burek> saste, v4l-ctl -L gives the list of user-settable options
[23:01] <saste> we recently added a few options which may affect the operation of your device
[23:01] <burek> and it's in a standard format i guess
[23:01] <burek> but imho it's pointless to make a wrapper around something that already works on cmd line
[23:02] <burek> unless ffmpeg resets some parameters on device open
[23:02] <saste> burek, what if you use a program?
[23:02] <Holden> burek, I'm on a old (10.04) ubuntu install, it says it cannot find the v4l-utils package
[23:02] <saste> ffmpeg is a library, amongst the various tools
[23:03] <saste> Holden, you sure your kernel supports v4l2?
[23:03] <burek> it should have v4l-utils
[23:03] <Holden> saste, of course, as I said the tv card works ok with other programs
[23:03] <saste> ok
[23:05] <burek> http://packages.ubuntu.com/search?keywords=v4l-utils&searchon=names&suite=quantal§ion=all
[23:06] <burek> does that mean v4l-utils
[23:06] <burek> is not available in previous ubuntu versions?
[23:06] <burek> if so, ubuntu sucks big time
[23:06] <Holden> lol
[23:06] <burek> anyway, try apt-cache search video4linux | grep utils
[23:06] <burek> maybe it was renamed
[23:07] <Holden> burek, it returns me nothing. can you show me the typical output of that command? maybe I have something equivalent
[23:07] <burek> you might also try luvcview to test all your uvc compliant v4l devices
[23:08] <burek> err.. try v4l2-ctl :D
[23:10] <Holden> :O sudo apt-get install ivtv-utils wants to install 25 packages and 21mb :D
[23:11] <burek> o.O
[23:11] <burek> output should look like this: http://pastebin.com/DTevc8TM
[23:14] <Holden> burek, ok, then I can show you something similar from my program: http://paste.ubuntu.com/1560916/
[23:15] <burek> set your input to one of the numbers 1-3
[23:16] <Holden> burek, that's what I did... it does not work
[23:18] <burek> try this: ffmpeg -loglevel debug -f v4l2 -i /dev/video0 test.mpg
[23:18] <burek> and copy the output to a pastebin-like site (like www.pastebin.com)
[23:21] <Holden> burek, just a second, I have changed the code and recompiled, maybe I have found the problem
[23:21] <burek> ok
[23:23] <Holden> great, I think I know what it does not work now... saste, you still around?
[23:24] <saste> Holden, yes
[23:26] <Holden> saste, the problem seems to be that v4l2_ioctl(s->fd, VIDIOC_G_PARM, &streamparm); returns a tpf of 0/0, after applying this patch http://paste.ubuntu.com/1560962/ it seem to work http://paste.ubuntu.com/1560966/
[23:27] <saste> Holden, cool
[23:27] <Holden> of course that's not a fix... it just serves to show where the problem is... I had noticed a while back that this tv card returned 0/0, while the webcams return a correct value, but I thought it was related to the tv standard or something
[23:27] <saste> so seems a missing validation problem
[23:28] <saste> Holden, would you mind opening a ticket on trac, so we don't discard it?
[23:28] <Holden> saste, also if I try -framerate 25, it does not accept it
[23:29] <Holden> saste, ok, I will do it, but can't promise you I do it now... do I have to register to open a ticket?
[23:29] <saste> Holden, yes, there is a register button on the top-right side of the trac page
[23:30] <dionys> hi - I try to do avconv -i aaa.MXF aaa.avi the formats are shown and all starts well from the output, the avi file gets created but then it stops at the first frame without error. The avi file is 38k and the MXF 100MB. Why is it not running through the whole file?
[23:31] <saste> Holden, https://ffmpeg.org/trac/ffmpeg
[23:32] <saste> dionys, missing pastebin but keeps in mind: ffmpeg != avconv
[23:32] <saste> *keep
[23:34] <Holden> saste, ok, I'm collecting all the info, I'll do it in the following days, I still want to look at the doc on linuxtv.org on why it does return 0/0...
[23:37] <dionys> pastebin.com/hfvm1k9n
[23:41] <saste> Holden, thanks
[23:43] <Holden> saste, ok, I also see we call v4l2_ioctl(s->fd, VIDIOC_S_PARM, &streamparm) without checking for (streamparm.parm.capture.capability & V4L2_CAP_TIMEPERFRAME) first, and that's why -framerate 25 fails... hmm, ok, I'll call it a day, I'll come back in the following days either with a ticket or a patch
[23:45] <dionys> I can convert a mp4 into a different size though - but it seems the MXF is just stopping. What do I do wrong there?
[23:49] <emc> hi, does anybody know how/if it's possible to show the ffmpeg command executed with a specific ffmpegX configuration?
[23:49] <emc> e.g. the output shows: http://pastebin.com/hGshysb2 but it doesn't contain the command executed
[00:00] --- Wed Jan 23 2013
More information about the Ffmpeg-devel-irc
mailing list