[00:17] <miguel_> when I try to use ffmpeg to record, the audio and video recording start at different times [00:17] <miguel_> can I make it so it only starts after an amount of seconds? [03:35] <fling> Hello! [04:20] <silv3r_m00n> hi there, i am recording desktop with ffmpeg, using this command, ffmpeg -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i :0.0 -vcodec libx264 -preset ultrafast -crf 0 -threads 0 -y screencast_out.avi [04:20] <silv3r_m00n> how can i pause and resume the recording ? [04:29] <fling> this works great > ffmpeg -f concat -i list -c copy output.avi [04:29] <fling> ffmpeg rocks! [04:29] <fling> silv3r_m00n: try sigstop but I may be wrong [04:30] <fling> silv3r_m00n: or capture to separate files and join them together afterwards [04:48] <silv3r_m00n> seems like have to concat multiple files [05:35] <uersbob> hi. i have a question about ffmpeg. [05:36] <uersbob> test* [06:00] <Zeranoe> Does FFmpeg have any support for the amv format? [09:02] <userDavid> i'm not sure if anyone is on, but i will ask a question [09:05] <userDavid> i'm trying this command. it works, but im trying to cut off the first few seconds of both audio files. Instead, it cuts off the video each time, ive tried a lot of variations [09:05] <userDavid> ffmpeg -i video1.mp4 -c:v libx264 -i audio1.wav -ss 2 -i audio2.wav -ss 3 -filter_complex "amix=inputs=2" -c:a libvo_aacenc output.avi [09:26] <ubitux> userDavid: -ss 2 applies to audio2.wav and -ss 3 applies to the whole presentation [09:27] <ubitux> (output) [09:48] <userDavid> oh. i read that placing -ss after the inpute gets a more accurate result [09:49] <ubitux> "output seeking" is more accurate yes [09:49] <ubitux> but -ss 2 isn't a more accurate output seking on audio1.wav [09:50] <ubitux> it's an input option for audio2.wav [10:01] <hi117> is there a program that can record sound and stop recording after the volume is too low for a certain period? [10:02] <hi117> for linux and perferably command line [10:16] <hi117> found it, sox [12:40] <slystone> Hi! [12:40] <slystone> for i in *.mp4; do ffmpeg -i $i -vcodec mpeg2video -ar 44100 -s 1280x720 ${i%mp4}.mpg; done I've tried this command for a batch of videos. But it seems the quality is then appalling. [12:40] <slystone> Si I could use your help. [12:41] <slystone> What would you do differently please? [12:42] <LithosLaptop> why do you want to convert them to MPEG2? [12:44] <slystone> LithosLaptop: well, because some machines can only read mpeg2, that's why. [12:44] <slystone> I wouldn't bother otherwise. [12:47] <LithosLaptop> oh ok, well you will have to bump up the bitrate for MPEG2 [12:47] <LithosLaptop> I am not sure at what bitrates it will start looking okay [12:48] <slystone> Input #0, mpeg, from 'PSES2013-Bayart-FTTH_Fiber_to_the_home..mpg': [12:48] <slystone> Duration: 01:27:44.66, start: 1.000000, bitrate: 637 kb/s [12:48] <slystone> Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc [12:48] <slystone> Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 128 kb/s [12:48] <slystone> this is what ffprobe has to tell. [12:48] <slystone> Could it work with -target dvd maybe? [12:49] <spaam> slystone: 1280x720 for dvd? :S [12:49] <spaam> dvd:s dont have that kind for size. [12:49] <LithosLaptop> also I assume all your input videos are the same? [12:49] <slystone> spaam: hum& right! [12:50] <slystone> LithosLaptop: I think so yes. [12:50] <LithosLaptop> can you ffprobe one of them? [12:51] <LithosLaptop> 637 kb/s is very low for 720p even for non MPEG2 codecs [12:52] <LithosLaptop> do those machines that can only read mpeg2 also support 720p resolutions? [12:52] <slystone> avprobe version 0.8.7-6:0.8.7-1, Copyright (c) 2007-2013 the Libav developers [12:52] <slystone> built on May 20 2013 12:25:19 with gcc 4.7.3 [12:52] <slystone> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'PSES2013-Zimmermann-Nos_machines_sont_elles_encore_nos_amies.mp4': [12:52] <slystone> Metadata: [12:52] <slystone> major_brand : isom [12:52] <slystone> minor_version : 512 [12:52] <slystone> compatible_brands: isomiso2avc1mp41 [12:52] <slystone> encoder : Lavf53.21.1 [12:52] <slystone> Duration: 00:38:11.92, start: 0.000000, bitrate: 1233 kb/s [12:52] <slystone> Stream #0.0(und): Video: h264 (Main), yuv420p, 1280x720, 1034 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc [12:52] <slystone> Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 191 kb/s [12:52] <slystone> this is for an input file. [12:53] <slystone> LithosLaptop: yes, they support 720p. [12:53] <LithosLaptop> ok [12:56] <slystone> LithosLaptop: so how would you change the bitrate at 637kb/s? [12:56] <LithosLaptop> ffmpeg -i $i -vb 2600k -vcodec mpeg2video -acodec libmp3lame -ab 192 -ar 44100 -s 1280x720 -fmt vob ${i%mp4}.mpg [12:56] <LithosLaptop> try that [12:57] <slystone> ok thanx! :) [12:58] <LithosLaptop> increase 2600 to something else if it still looks crap :) [12:58] <slystone> Yep, that part I've guessed. :) [12:58] <slystone> And what is -fmt vob for? [12:59] <LithosLaptop> MPEG 2 Program Stream. container format for DVDs [12:59] <slystone> Cool! :) [13:00] <slystone> Thanx a bunch LithosLaptop! [13:00] <LithosLaptop> no prob [13:00] <LithosLaptop> btw if it can't read the file try removing -fmt vob [13:01] <slystone> Hum, ok. :) [14:14] <kvz> the ffmpeg site mentions "FFmpeg Static Builds by Burek and FFmpeg Static Builds by Relaxed". I'm considering using one in production to convert a wide variety of formats. I'll run tests, but does anybody have good/bad experiences with either one of them? [14:14] <Mavrik> um, they should all work [14:14] <Mavrik> probably difference is in bundled libraries [15:22] <semme> guys i was wondering if there is example of on-the-fly remuxing with ffmpeg [16:50] <eduardoboucas> hi guys. I'm using ffmpeg to encode an MP3 from a wave file, but i'm getting an unexpected result. the audio is shifted for some reason [16:51] <eduardoboucas> I took a snapshot of both audio files on a DAW where the offset is very clear: http://snag.gy/lymi9.jpg [16:51] <eduardoboucas> does anyone have any idea of what can be causing this? [16:59] <brontosaurusrex> eduardoboucas, try lame decode your.mp3 and see if offset is gone [16:59] <brontosaurusrex> lame --decode my.mp3 [16:59] <eduardoboucas> ok [17:01] <eduardoboucas> yeah, the offset is gone [17:01] <eduardoboucas> what does this mean? [17:02] <brontosaurusrex> read http://www.hydrogenaudio.org/forums/index.php?showtopic=72327 [17:03] <eduardoboucas> thanks! [17:03] <brontosaurusrex> np [17:04] <eduardoboucas> wow, so there's no solution whatsoever? [17:04] <eduardoboucas> this will be a big problem for me :/ [17:05] <brontosaurusrex> use some other lossy format that doesnt have this? [17:05] <eduardoboucas> the thing is that I'm working on a web audio editor [17:05] <brontosaurusrex> aac perhaps [17:06] <eduardoboucas> and the formats supported by browsers for HTML5 Audio playback aren't that many [17:07] <eduardoboucas> the idea is that users record their tracks by plugging their instrument to the computer and the result is a wave file [17:07] <brontosaurusrex> the combo of vorbis and aac perhaps (but i'am not sure about offsets, you will have to test) [17:07] <eduardoboucas> but I can't afford to save wave files on the server, so I was planning on converting the files to MP3 [17:07] <eduardoboucas> but I can't lose sync, so this is no good for me [17:08] <eduardoboucas> but yeah, I'll make some tests. thanks! [17:08] <brontosaurusrex> here is some reading about lame http://lame.sourceforge.net/tech-FAQ.txt [17:09] <brontosaurusrex> looks like "--nores option in LAME" may do what you want [17:10] <eduardoboucas> I'll definitely check it out. thanks a lot! [17:13] <eduardoboucas> apparently, Vorbis does not introduce any offset [17:13] <eduardoboucas> I just tested [17:14] <LithosLaptop2> eduardoboucas: AAC is just as well supported as MP3 in HTML5 audio. In fact I didn't even know MP3 was widely supported [17:14] <LithosLaptop2> you will need to support Vorbis as well as AAC if you want to support most browsers [17:14] <eduardoboucas> you're right [17:15] <eduardoboucas> I'll try to encode to AAC to see if there is any offset, just in case :) [17:15] <brontosaurusrex> eduardoboucas, what OS are you on? [17:15] <LithosLaptop2> haha ok, just be carefull. there is only one good quality AAC encoder available with ffmpeg [17:16] <eduardoboucas> brontosaurusrex, a CentOS server [17:17] <brontosaurusrex> ok, then ffmpeg with fgh aac encoder is what you need or old nero linux encoder perhaps [17:17] <LithosLaptop2> fgh = libfdk_aac [17:17] <brontosaurusrex> --enable-libfdk-aac < yes [17:18] <brontosaurusrex> *fgh = fdk [17:19] <eduardoboucas> ok, so I assume I need to reinstall ffmpeg, right? [17:21] <brontosaurusrex> i have a static debian 64 compile from git, which i could share, but dunno if that would work on centOS [17:21] <brontosaurusrex> configuration: --enable-gpl --enable-libx264 --enable-libfdk-aac --enable-nonfree --enable-version3 --disable-shared --enable-static --extra-libs=-static --extra-cflags=--static [17:21] <eduardoboucas> hmm [17:22] <brontosaurusrex> anyway, you could build it from git. [17:22] <brontosaurusrex> adding the fdk part [17:23] <eduardoboucas> ok [17:25] <brontosaurusrex> and also vorbis and lame [17:25] <brontosaurusrex> is what you need [17:25] <eduardoboucas> yeah I have vorbis and lame working [17:26] <eduardoboucas> I remember I just followed some guide to download all those libraries and ffmpeg-source and then I installed everything [17:26] <eduardoboucas> so I guess I can just download this new library and repeat the whole process? [17:27] <brontosaurusrex> eduardoboucas, another thing, there are some js decoders out there btw [17:28] <brontosaurusrex> eduardoboucas, like http://libwebpjs.hohenlimburg.org/vp8/ogg-vorbis-javascript-decoder/ [17:28] <eduardoboucas> (yeah, I followed this, http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide, and for some reason I was stupid enough not to include the AAC library) [17:28] <eduardoboucas> hmm [17:28] <brontosaurusrex> dunno if that would be fast enough for what you are doing thought [17:30] <eduardoboucas> yeah, timing is a very delicate subject in my case [18:00] <semme> any idea how to copy a stream with libavcodec? [18:01] <semme> i have a/v stream coming from FLV over HTTP and i want to remux it to MP4 [18:01] <semme> how to copy the incoming streams to the remux MP4 [18:04] <eduardoboucas> brontosaurusrex, I'm getting an error when installing fdk-aac from Git. config.status: error: cannot find input file: Makefile.in [18:04] <eduardoboucas> do you have any idea of what might be happening? [18:05] <brontosaurusrex> eduardoboucas, take the tarball [18:05] <eduardoboucas> (still following this: http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide) [18:06] <Mavrik> semme, -codec copy [18:06] <semme> yeah the equivalent of acodec copy but through the libav API [18:06] <Mavrik> um [18:07] <Mavrik> just dont reencode the packet? [18:07] <semme> so i just memcopy the packet? [18:07] <Mavrik> mhm. [18:07] <Mavrik> I'm not even sure you have to memcpy it [18:08] <semme> thanks Mavrik, btw out of curiosity instead of remux a file, is there even faster to way to just change the header? [18:08] <Mavrik> from what? [18:11] <semme> i've got an F4V (h264/aac) but the program that is supposed to play it does not support FLV [18:11] <semme> but if i use MP4 header everything is fine [18:12] <semme> and i was thinking is there a way to just change the header and stream the body as is [18:16] <Mavrik> uh [18:16] <Mavrik> I doubt that would work. [18:16] <Mavrik> but I have no idea how FLV container is structured internally [18:24] <semme> ok thanks [18:24] <semme> seems diff than FLV [18:25] <semme> btw Mavrik, sorry if its too many questions, but do you have an idea where i can define the movflags [18:25] <semme> through the api [18:25] <semme> im talking flags like -movflags faststart, but defined through the API [18:25] <Mavrik> mhm [18:25] <Mavrik> I think it's av_option_set [18:25] <Mavrik> or something like that [18:25] <semme> ok thank you very much [18:25] <Mavrik> check mov.c source file on how the parameters are stored in the context [18:26] <semme> will do [18:40] <eduardoboucas> brontosaurusrex, I reinstalled FFmpeg, supposedly with fdk-acc, but it doesn't seem to be working :/ [18:41] <brontosaurusrex> eduardoboucas, some command lines http://www.hydrogenaudio.org/forums/index.php?showtopic=95989&st=25&p=804484entry804484 [18:41] <brontosaurusrex> and post your cli [18:43] <eduardoboucas> ok, but before I do that, is there any way to check if the library was correctly installed? [18:44] <durandal_1707> yes paste ffmpeg output [18:45] <eduardoboucas> http://pastebin.com/uEMXdW40 [18:46] <eduardoboucas> it says it was built on April [18:46] <brontosaurusrex> on debian "sudo ldconfig" will "fix" libraries [18:46] <brontosaurusrex> eduardoboucas, that doesnt have you aac encoder at all [18:47] <eduardoboucas> is it possible I'm running like the "old" ffmpeg version and not the one I just re-installed? [18:48] <brontosaurusrex> eduardoboucas, what does "which ffmpeg" says [18:48] <brontosaurusrex> eduardoboucas, acording to that centos build-link you are builing in user space [18:48] <brontosaurusrex> *building [18:49] <eduardoboucas> it says /usr/local/bin/ffmpeg [18:49] <brontosaurusrex> and your compile should be in /home/user/bin [18:50] <brontosaurusrex> or whatever is home folder in centos, --bindir="$HOME/bin" [18:51] <brontosaurusrex> try running ~/bin/ffmpeg [18:51] <eduardoboucas> http://pastebin.com/TLC1P3wY [18:51] <eduardoboucas> I guess this is the one I should be running [18:51] <brontosaurusrex> yep [18:52] <eduardoboucas> how can I fix this mess of having 2 ffmpegs? [18:52] <brontosaurusrex> how did you install the 1st one? [18:53] <eduardoboucas> I followed the same guide, so I don't know what could I have done differently [18:53] <brontosaurusrex> perhaps you have been using the version from repos without even knowing it? [18:54] <eduardoboucas> I don't know :S [18:54] <eduardoboucas> isn't there any way to just remove the first one? [18:54] <brontosaurusrex> use your apt-get remove [18:54] <brontosaurusrex> yum whatever [18:55] <eduardoboucas> I assume it's something more than just removing the binary [18:55] <brontosaurusrex> it is [18:55] <eduardoboucas> Package(s) ffmpeg available, but not installed. [18:56] <eduardoboucas> so I guess I wasn't using the one from yum [18:56] <brontosaurusrex> dunno :) [18:56] <brontosaurusrex> probably not [18:56] <eduardoboucas> gosh, what a mess [18:57] <brontosaurusrex> well, compare versions of /usr/local/bin/ffmpeg and the one in repos [18:57] <brontosaurusrex> and you should get a clue [18:58] <brontosaurusrex> if the repo version is older, than the one in /usr/local/bin/ffmpeg is something you "compiled in" [18:58] <brontosaurusrex> from there it gets yum related, and i dont know yum, so i will not comment on that [18:59] <eduardoboucas> ok thanks [19:02] <brontosaurusrex> looking at that guide its basically missing some sort of abstraction layer in the end [19:03] <brontosaurusrex> i try to compile shared stuff via checkinstall, which would produce *.deb file and my package manager would then also be aware of that [19:04] <brontosaurusrex> or i would build static and put ffmpeg bin to the specific spot manually [19:04] <brontosaurusrex> now, i'am far from compiling expert, just what i have noticed from absorbing various web guides .... [20:35] <rmzelnick> http://pastebin.com/sHxTTLFA [20:36] <rmzelnick> I got this problem yesterday, and now I can't play any video on VLC anymore =( [21:17] <mjrosenb> silly question-- what does this mean: Could not write header for output file #0 (incorrect codec parameters ?) [21:17] <mjrosenb> the audio and video codecs are 'copy' [21:18] <mjrosenb> is it talking about the container's codec? [21:19] <cbsrobot_> yes, not all containers support all codecs [21:20] <durandal11707> mjrosenb: what you are trying to do? [21:27] <mjrosenb> cbsrobot_: that I did not know. [21:27] <Mavrik> mjrosenb, usually there's an actual error written in previous ouput [21:27] <mjrosenb> durandal11707: I am trying to re-encode a .ts file as .mkv [21:27] <mjrosenb> mkvtoolnix can extract the video, but is clueless about the audio. [21:28] <mjrosenb> https://gist.github.com/5944597 is the full output. [21:28] <mjrosenb> mkv certainly supports h.264 [21:29] <mjrosenb> maybe it doesn't support aac? [21:29] <mjrosenb> that seems unlikely to me. [21:29] <Mavrik> that's wierd, ffmpeg shouldn't have any problems remuxing this [21:33] <mjrosenb> Mavrik: that is what I though, yet here I am :-p [21:36] <Mavrik> mjrosenb, can you try grabbing the latest static build? [21:38] <mjrosenb> Mavrik: sure thing, where do they live? [21:38] <Mavrik> uhh [21:39] <Mavrik> ffmpeg download site :P [21:39] <Mavrik> http://ffmpeg.gusari.org/static/64bit/ [21:40] <mjrosenb> looks like there haven't been any new ones for like two weeks? [21:41] <Mavrik> and you're using a build from previous year [21:41] <Mavrik> I think two weeks is fine ;) [21:41] <mjrosenb> touche. [21:42] <mjrosenb> Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input [21:42] <mjrosenb> well, that is certainly a different error. [21:46] <Mavrik> huh [21:47] <mjrosenb> although it doesn't say if it is in the container, audio or video stream. [21:48] <osmodiar> [mpegts @ 00000000023fa6e0] max_analyze_duration 5000000 reached at 5005000 microseconds [21:48] <osmodiar> Probably that. [21:50] <Mavrik> nah, that's not an error [21:50] <mjrosenb> so there is a bit of corruption, and the whole thing is falling over dead? [21:50] <mjrosenb> mplayer seems to be playing it without issue. [22:00] <mjrosenb> https://gist.github.com/5944693 is the output of running mplayer on the file. [22:17] <Mavrik> mjrosenb, did you try remuxing to mp4 just in case? [22:20] <Fjorgynn> :) [22:32] <mjrosenb> Mavrik: negative. [22:33] <mjrosenb> [mp4 @ 0x3a45e40] Malformed AAC bitstream detected: use audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg) [22:33] <mjrosenb> av_interleaved_write_frame(): Operation not permitted [22:33] <mjrosenb> well, that was even more informative! [22:33] <Mavrik> hmm, that could explain some things :) [22:42] <mjrosenb> is there a reason that different containes give different errors on demuxing the input? [22:45] <Mavrik> mjrosenb, those errors are from the muxers [22:45] <mjrosenb> *boggle* [22:45] <Mavrik> and the reason is simply& because each muxer generates their own ;) [22:45] <mjrosenb> I added that line to the .mp4 output, and it muxed properly [22:45] <mjrosenb> I replaced .mp4 with .mkv [22:45] <mjrosenb> and it failed with the same cryptic error [22:45] <mjrosenb> but muxing the .mp4 to .mkv worked. [22:46] <Mavrik> ^^ [22:47] <LithosLaptop2> lol [22:47] <mjrosenb> Mavrik: is -bsf:a aac_adtstoasc an argument to the muxer? [22:47] <Mavrik> no, that's a bitstream filter [22:47] <Mavrik> it filters audio bytes before they go in the muxer [22:48] <mjrosenb> right, so presumably, it fixed whatever corruption was in the audio stream, so why would the mkv muxer still not like the stream? [22:49] <mjrosenb> nevermind. that muxing failed misreably. [22:49] <mjrosenb> muxing to .mp4 didn't work, evidently. [22:50] <MachinaeWolf> freaking errors http://pastebin.com/ZKVHbRfN [22:51] <Mavrik> mjrosenb, it seems your audio is encoded in ADTS format, not ASC without headers& AAC can have about 3 different bitstream formats [22:52] <Mavrik> some made for streaming, some for just "normal files" [22:52] <Mavrik> MachinaeWolf, good thing you're not running ffmpeg. [22:52] <MachinaeWolf> ?_? [22:52] <MachinaeWolf> wut [23:07] <MachinaeWolf> gah lame signal [23:07] <MachinaeWolf> <Mavrik> MachinaeWolf, good thing you're not running ffmpeg. [23:07] <MachinaeWolf> <MachinaeWolf> ?_? [23:07] <MachinaeWolf> <MachinaeWolf> wut [23:09] <osmodiar> Read that, MachinaeWolf. [23:09] <MachinaeWolf> k [23:11] <MachinaeWolf> Does it take the same options? [23:11] <mjrosenb> I saw "!fork" and thought that ffmpeg was forking, and executing something else that was spewing errors, needless to say, I was confused before reading the link. [00:00] --- Mon Jul 8 2013
participants (1)
-
burek