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

burek burek021 at gmail.com
Wed Sep 11 02:05:01 CEST 2013


[01:10] <plitter> is it possible to extract pgs subtitles from file?
[01:11] <plitter> with ffmpeg
[02:31] <causasui> hi, i have a couple flv videos i am trying to extract sections out of and then join the sections, but i am an ffmpeg noob, as you can see:
[02:31] <causasui> $ ffmpeg -vcodec avi -acodec mp3 -i LiveLeak-dot-com-87363-rosskempstlouis4.flv -ss 00:07:25 newfile1.avi
[02:31] <causasui> Unknown decoder 'avi'
[02:34] <klaxa> syntax is ffmpeg [input_options] -i <input> [output_options] <output>
[02:34] <klaxa> so put the output options you chose behind the input
[02:46] <causasui> klaxa: ah i'll try that
[02:46] <klaxa> ah also, avi is not a video codec
[02:46] <klaxa> you might just want to try -c copy instead of -vcodec avi -acodec mp3
[02:48] <causasui> $ ffmpeg -c copy -i LiveLeak-dot-com-87363-rosskempstlouis4.flv -ss 00:07:25 -vcodec 3gp -acodec mp3 newfile1.avi
[02:48] <causasui> Unknown decoder 'copy'
[02:48] <klaxa> no no no
[02:48] <causasui> :<
[02:48] <klaxa> don't put -c copy before the input
[02:48] <causasui> haha
[02:48] <klaxa> if you want to use 3gp and mp3 don't use -c copy at all
[02:49] <causasui> klaxa: okay i did this but the output file seems to have only audio and no video
[02:49] <causasui> ffmpeg -i LiveLeak-dot-com-87363-rosskempstlouis4.flv -ss 00:07:25 -c copy newfile1.flv
[02:49] <klaxa> that is indeed kinda weird
[02:49] <klaxa> can you pastebin your input + the complete output of ffmpeg?
[02:50] <causasui> klaxa: ok
[02:51] <causasui> klaxa: https://privatepaste.com/2f414ea77f
[02:51] <klaxa> it should have video
[02:51] <klaxa> what player are you using?
[02:53] <causasui> klaxa: smplayer
[02:53] <klaxa> funny, can you try ffplay?
[02:54] <klaxa> although it is probably almost the same codebase
[02:54] <causasui> klaxa: i am getting a spectrogram with audio
[02:54] <klaxa> hmm...
[02:54] <klaxa> that usually means no video haha
[02:55] <klaxa> >[flv @ 0x18df880] Stream discovered after head already parsed [flv @ 0x18df880] New data stream 0:2 at pos:21830905 and DTS:538.873s
[02:55] <klaxa> this looks suspicious
[02:56] <klaxa> you could try a different container but i doubt it'll help
[02:56] <klaxa> if all fails, re-encode :x
[02:59] <causasui> klaxa: source is already pretty much shit quality
[02:59] <causasui> filmed with a toaster etc
[02:59] <klaxa> lool
[02:59] <klaxa> well then it shouldn't make much difference if you encode to h264 with libx264
[02:59] <causasui> klaxa: would it do anything to give it an ending timestamp? i just want everything from that stamp to the end of the clip
[03:00] <klaxa> you gave it a starting timestamp
[03:00] <klaxa> it will encode to the end
[03:00] <klaxa> like i said you can try a different container
[03:00] <klaxa> just use newfile1.mkv instead of newfile.avi
[03:23] <causasui> klaxa: ok
[03:24] <causasui> klaxa: i think that worked
[03:30] <causasui> klaxa: yep, victory. thanks :)
[03:30] <klaxa> nice :)
[04:53] <Mista_D> Can I add yadif first and then add logo? -vf "movie=147x124.mov [watermark]; [in] [watermark] overlay=550:10 [out]"
[06:31] <Mista_D> -vf "movie=147x124.mov [watermark]; [in] [watermark] overlay=550:10,yadif [out]" worked \o/
[09:11] <niksmac> i am getting this error
[09:11] <niksmac> Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[09:11] <niksmac> this is what i tried /usr/bin/ffmpeg -i '/home/onevid/public_html/sites/default/files/videos/original/D India on four Wheels.avi.avi' -vf 'scale=320:240' -strict experimental -vcodec 'h264' -qscale '12' -acodec 'vorbis' -ac '2' -pass '1' -passlogfile '/tmp/1378796929-522ec58158cf6-multipass'  -y /tmp/1378796929-522ec58158b8e.mp4
[09:12] <niksmac> this is my configuration
[09:12] <niksmac>  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libtheora
[09:13] <niksmac> see more here http://pastebin.com/KJsmwGE7
[09:14] <niksmac> sacarasc you there ?
[09:17] <niksmac> anybody ?
[09:19] <niksmac> any idea on this http://pastebin.com/KJsmwGE7 ?
[09:25] <niksmac> nobody here ?
[10:08] <niksmac> any idea on this http://pastebin.com/KJsmwGE7 ?
[10:17] <niksmac> saste  any idea on this http://pastebin.com/KJsmwGE7 ?
[10:23] <niksmac> ods15 ubitux uau any idea on this http://pastebin.com/KJsmwGE7 ?
[10:24] <ubitux> no
[10:24] <relaxed> don't highlight random people
[10:26] <relaxed> -vcodec libx264 -acodec libvorbis
[10:27] <Mavrik-> yeah, stuffing vorbis into mp4 probably won't work.
[10:30] <niksmac> Mavrik what to do now ?
[10:34] <Mavrik> well don't use vorbis for audio if you're muxing into mp4 right?
[10:36] <niksmac> yes
[10:36] <niksmac> which is supported ?
[10:36] <Mavrik> AAC is your safest bet
[10:36] <niksmac> have you seen my configuration ? http://pastebin.com/KJsmwGE7
[10:38] <niksmac> Mavrik i tried this /usr/bin/ffmpeg -i '/home/onevid/public_html/sites/default/files/videos/original/D India on four Wheels.avi.avi' -vf 'scale=320:240' -strict experimental -vcodec 'h264' -qscale '12' -acodec 'aac' -ac '2' -pass '1' -passlogfile '/tmp/1378802292-522eda74833ed-multipass'  -y /tmp/1378802292-522eda74832b5.mp4
[10:39] <niksmac> FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".
[10:39] <Mavrik> niksmac, the error is few lines up
[10:39] <niksmac> Mavrik  means ?
[10:40] <Mavrik> it means that your actual error is few lines above what you pasted.
[10:40] <Mavrik> read that.
[10:41] <niksmac> ic here is it
[10:41] <niksmac> PHPVideoToolkit error: Execute error. It was not possible to encode "/home/onevid/public_html/sites/default/files/videos/original/D India on four Wheels.avi.avi" as FFmpeg returned an error. Note, however the error was encountered on the second pass of the encoding process and the first pass appear to go fine. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0:0 - maybe
[10:41] <niksmac> incorrect parameters such as bit_rate, rate, width or height".
[10:43] <niksmac> Mavrik you understands right ?
[10:43] <niksmac> if yes please let me know what to do next
[10:46] <niksmac> Mavrik any idea ?
[14:31] <t4nk413> hi
[14:32] <t4nk413> what is av_rescale_q?
[14:32] <t4nk413> ffmpeg and ffserver use a lot of av_rescale_q for pts and dts
[14:32] <t4nk413> does anyone know when I can find the document that describe av_rescale_q?
[14:33] <t4nk413> does anyone know where I can find the document that describe av_rescale_q?
[14:34] <ubitux> simple cross product
[14:36] <ubitux> rescale X (within [A;B]) to [C;D] range
[14:37] <ubitux> it's generally used to switch time base
[15:00] <fsb> hi
[15:04] <t4nk413> hi
[15:04] <t4nk413> there are several transfer between input stream and output stream
[15:37] <fsb> I'm using ffmpeg to capture video MJPEG from an ip camera, but sometimes the camera lag and timeout. I'm trying to reset/reopen/reconnect to camera without restart the application. I'm using ffmpeg api version 1.2.3. I tried to close the AVFormatContext to reopen. I tried open a new AVFormatContext. I tried reopen the AVCodec. Nothing work, how do I do this?
[15:58] <xzise> Hi, is there a shortcut for the mapping when merging to files? I got something like ffmpeg -i a.mkv -i b.mkv -map 0:0 -map 1:1 -map ALL_OTHER_STREAMS_OF_a.mkv -c copy out.mkv
[15:58] <xzise> -map 0:0 -map 1:1 -map 0 -map -0:0 will also override the first map
[16:06] <klaxa> maybe ffmpeg -i a.mkv -i b.mkv -map 0 -map 1:1 -c copy out.mkv
[16:06] <klaxa> ?
[16:07] <klaxa> otherwise, have a look at mkvmerge
[16:07] <klaxa> the mkvmerge gui (executable is named "mmg") is rather straight forward
[17:03] <dorp> Is it possible to split video streams based on I frames, accurately? If ffprobe indicates that the 3rd I frame position is at 29.958333, what value would -ss translate as the 3rd I frame? 30? 29.959? 29.958? Is there any certainty for having consistency behind this conversion?
[17:06] <Mavrik> dorp, by default ffmpeg seeks back to the first I-frame it can find for most formats
[17:06] <Mavrik> so 29.959 will cause ffmpeg to seek back to the first I-frame before that timestamp
[17:07] <Mavrik> so rounding up is your best bet
[17:07] <Mavrik> also, if you're transcoding (not just using copy as codec) you should probably use -noaccurate-seek
[17:11] <dorp> Mavrik: I see. Thanks
[17:14] <xlinkz0> use -avoid_negative_ts 1 if you ever want to concat those cuts
[17:19] <dorp> xlinkz0: Thanks for the input, I'm just reading about it
[17:27] <dorp> xlinkz0: This is a little bit weird, I've found quite a few hits for -avoid_negative_ts. It's even mentioned in the documentation- but I can't find a detailed 'description' of it?
[17:29] <xlinkz0> ffmpeg will, when cutting on a non i-frame timestamp, create videos that have the starting timestamp ( in the metadata ) different from 0
[17:29] <xlinkz0> like if i cut from second 3 to 5 and the i-frame is on second 2, the resulting cut will have a starting timestamp of 1
[17:29] <xlinkz0> this screws up the concat demuxer
[17:30] <xlinkz0> i'd go as far as say it's a bug in it because i see no reason to go by that metadata timestamp but whatever
[17:31] <dorp> xlinkz0: How about the case of: splitting a video based on I frames, and then trying to concating it- is it likely to 'rebuild' properly?
[17:32] <xlinkz0> yes but often times you have no way of telling if you are cutting on an i-frame or not
[17:32] <xlinkz0> certain video sources don't have constant i-frames like say every second
[17:33] <xlinkz0> just to be safe if you are going to concat them using ffmpeg just use the flag there's no performance penalty or anything
[17:33] <dorp> xlinkz0: What if I use ffprobe for telling the I frames timestamps, and then use it with ffmpeg -ss?
[17:33] <xlinkz0> how is that easier and more practical than adding a flag?
[17:33] <xlinkz0> you'll have to parse ffprobe every time you want to cut, it complicates your code for no reason
[17:34] <dorp> xlinkz0: I'm not referring only to the case this specific flag is supposed to fix,  my question was about the big picture?
[17:34] <xlinkz0> big picture?
[17:35] <dorp> I would like to be able to split video files, based on their I frames, and then to be able to 'rebuild' them. Is it something feasible, or unlikely to go smoothly?
[17:35] <xlinkz0> it is feasible, as long as you either cut directly on i-frames or use that flag
[17:36] <dorp> I see, okay- I'll run a few tests and see what it looks like
[19:00] <_goTAN> hey
[19:01] <_goTAN> I want to convert avi to mp4 but without using the libfaac.
[19:05] <sacarasc> Try ffmpeg -i blah.avi -c:v libx264 -preset:v veryslow -crf 25 -c:a aac -strict experimental -b:a 128k output.mp4
[19:08] <_goTAN> ah
[19:08] <dlb76> hey guys
[19:08] <dlb76> [NULL @ 0000000002534f60] Unable to find a suitable output format for '123.amv'
[19:09] <dlb76> is there a way to make it work ?
[19:09] <dlb76> AMV encoder...
[19:09] <dlb76> where to leech ffmpeg.exe for win with it ?
[19:10] <_goTAN> thanks sacarasc
[19:11] <_goTAN> is there a reason why I shouldn't use 256k for the audio?
[19:11] <sacarasc> _goTAN: If you can compile yourself, you might want to look at libfdk_aac. I've heard it's pretty good, but never used it myself.
[19:11] <sacarasc> Not really, but you're probably encoding from a lossy codec with a lower bitrate...
[19:12] <sacarasc> And lossy ¶ lossy always loses something.
[19:12] <_goTAN> well yea I could but tbh I am encoding alot of different stuff and everything is working atm so I dont wanna change a running system :)
[19:12] <_goTAN> yea k
[19:12] <brontosaurusrex> what would this subtitles format be called? http://paste.debian.net/plain/38010
[19:13] <sacarasc> That looks like srt, brontosaurusrex.
[19:13] <brontosaurusrex> nope, srt doesnt use timecodes and the times are not space separated
[19:14] <sacarasc> I thought srt did use timecodes?
[19:14] <sacarasc> 1
[19:14] <sacarasc> 00:03:10,500 --> 00:00:13,000
[19:14] <sacarasc> Elephant's Dream
[19:14] <sacarasc> That's a bit of srt... It is a little different, though.
[19:15] <brontosaurusrex> yeah
[19:15] <Plorkyeran> srt uses times
[19:15] <brontosaurusrex> see the last number is in miliseconds
[19:15] <brontosaurusrex> what i have here is 25 fps timecode
[19:15] <Plorkyeran> timecodes in this context means smpte timecodes, aka frame numbers written funnily
[19:16] <brontosaurusrex> basically i'am looking for a way to get this format into premiere cs6 (can be ugly looking, just for preview purposes)
[19:20] <_goTAN> sacarasc: hm is there a way to speed up ur example you gave me? Actually speed doesnt matter to me in this case but I have to say its really really slow
[19:22] <_goTAN> well I could use a different preset
[19:22] <_goTAN> :)
[19:22] <sacarasc> _goTAN: You can choose from ultrafast/superfast/veryfast/faster/fast/medium/slow/slower/veryslow/placebo. The further one the left the faster, the further on the right the slower.
[19:23] <_goTAN> yea I remember that
[19:24] <_goTAN> well I think I leave veryslow but I just wanted to test it and now its already running 30 min for 2 min video
[19:25] <brontosaurusrex> probably why its called "veryslow"
[19:27] <_goTAN> yea lol
[19:28] <_goTAN> now that you say that... it actually makes sense
[19:41] <_goTAN> damn I cant play the converted mp4 on my Ipad
[19:41] <_goTAN> dont know why
[19:46] <CentRookie> hi all
[19:47] <CentRookie> is there a way to encode mkv with soft subs embedded directly to mp4?
[19:47] <CentRookie> without extract the subs first?
[19:47] <CentRookie> (talking about hardcoding subs into mp4)
[20:53] <brontosaurusrex> CentRookie, as far as i know mp4 is supporting something called timed text format
[20:53] <brontosaurusrex> l8r ~
[20:56] <klaxa> CentRookie: there is: ffmpeg -i input.mkv -vf ass=input.mkv [encoding settings] output.mp4
[20:57] <klaxa> softsubs are nicer than hardsubs though
[21:11] <CentRookie> oh
[21:11] <CentRookie> i didnt know that klaxa, nice XD
[21:11] <CentRookie> does this work for ssa?
[21:11] <klaxa> it should
[21:12] <CentRookie> that s amazing
[21:12] <CentRookie> no more extracting
[21:12] <CentRookie> but i need to enable ssa lib right and ffmpeg need sto be compiled to include it?
[21:13] <CentRookie> havent been able to find which is the lib for ssa
[21:13] <klaxa> you need libass yes
[21:13] <CentRookie> i got libass
[21:13] <CentRookie> will it support ssa?
[21:13] <klaxa> >libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter.
[21:13] <CentRookie> hm
[21:14] <CentRookie> if this also work swith srt then it would be a perfect day for me
[21:14] <CentRookie> -vf srt=video.mkv ?
[21:14] <klaxa> libass might be able to render srt too
[21:14] <klaxa> i'm not too sure though
[21:16] <CentRookie> i think for srt it is "subtitles"
[21:16] <CentRookie> subtitles=subtitle.srt
[21:16] <CentRookie> wonder if it accepts mkv
[21:21] <CentRookie> eating a wagner stone oven pizza
[21:22] <CentRookie> damn those germans, their frozen pizzas are so good
[21:23] <CentRookie> http://techcrunch.com/2013/09/09/cota-by-ossia-wireless-power/
[21:23] <CentRookie> awesome
[21:30] <CentRookie> oh, 10 m and not 10 feet
[21:31] <CentRookie> even in the internet age ppl still use emperical units
[21:32] <CentRookie> ups, wrong chat sorry ^^
[22:52] <causasui> CentRookie: imperial*
[22:52] <causasui> :)
[00:00] --- Wed Sep 11 2013


More information about the Ffmpeg-devel-irc mailing list