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

burek burek021 at gmail.com
Mon Nov 24 02:05:01 CET 2014


[00:09] <vvo> Hi, I am using ffmpeg to cut part of a log video (> 1 hour), cutting 5 seconds takes ages (> 1minute): ffmpeg -ss 200 -i movie.mp4 -to 5 ..
[00:10] <vvo> Can I mitigate this?
[00:10] <vvo> I am outputting to stdout to then pipe to other unix tool, mabe it's the problem?
[00:11] <sacarasc> If you put the -ss after the -i, it should be quicker, but less accurate.
[00:11] <vvo> The farest the start point, the longer it takes
[00:11] <vvo> Well sacarasc it's the opposite
[00:11] <vvo> https://trac.ffmpeg.org/wiki/Seeking%20with%20FFmpeg
[00:12] <sacarasc> Then I am wrong. I always forget which way it is.
[00:12] <c_14> And as long as you aren't using -c copy, they should both be just as accurate.
[00:13] <diginet> is there a way to convert only part of a video to a sequence of PNGs? I know how to do it for the whole video, but I have a large movie where I want to only extract frames from about a 5 second interval
[00:14] <vvo> diginet: I am just finishing a tool that does exactly this but with animated gifs
[00:14] <diginet> vvo: interesting (making a gif is actually my end goal)
[00:14] <vvo> ahah
[00:14] <vvo> then we are on the same path
[00:14] <vvo> I tried the png way
[00:14] <vvo> but it ended up with bigger gifs
[00:14] <vvo> in the end
[00:15] <vvo> (mp4 > %d.png > gif)
[00:15] <vvo> going to push my project in some minutes
[00:15] <diginet> yeah
[00:15] <diginet> it's too bad GIF doesn't have any sort of interframe compression
[00:16] <vvo> I combine ffmpeg, convert and https://github.com/pornel/giflossy
[00:16] <vvo> And I get very good compression
[00:16] <vvo> I am only struggling with fast seeking, which is not as fast as I thought
[00:17] <diginet> vvo: is that your repo?
[00:17] <vvo> For screencast it's ok but for 3.2gb movies it's slow
[00:17] <vvo> going to push in minutes, will keep you posted here
[00:17] <vvo> wait
[00:17] <vvo> it's in node.js but from the index.js file you will be able to find all the needed commands to | pipe
[00:17] <vvo> because you can do it all in memory (ffmpeg | convert | gifsicle) unix way!
[00:18] <diginet> vvo: lol, imagine what an entire feature length movie in GIF format would look like. . .filesize-wise
[00:20] <vvo> no no
[00:20] <vvo> only a part of it of course
[00:21] <vvo> but even cutting from 200s to 205s takes ages
[00:21] <vvo> seems like it's dealing with 0-200 frames while they will be dropped
[00:57] <vvo> diginet: https://github.com/vvo/gifify
[00:57] <vvo> what do you think?
[01:08] <vvo> diginet: ?
[10:25] <zenny1> Hi, I am trying to capture video and audio from webcam with v4l2 drivers. I would like to capture one video stream with libaac and another audio stream with pcm_s16le separately from the same webcam source. Tried with: ffmpeg -f alsa -ac 2 -acodec pcm_s16le -i hw:2,0 -f v4l2 -vcodec h264 -r 30 -s 1920x1080 -i /dev/video0 -f alsa -ac 2 -i hw:2,0 -map 0:0 -c:v copy -c:a copy VIDEO+AUDIO.mp4 -map 1:0 -c:a pcm_s16le AUDIO_ONLY.wav getti
[12:34] <rhagu> Hi I have a large collection of mkv and due to some stupid resizing of volumes many of them may be damaged (missing parts) is there a way to check their integrity with ffmpeg?
[16:50] <c_14> rhagu: ffmpeg -i mkv -f null /dev/null <- should do it
[17:10] <rhagu> c_14 thanks for the answer, I tried this: "ffmpeg -v warning -i my.mkv -f null -" as it was mentioned on a homepage, what would be the difference?
[17:12] <c_14> You might get slightly less messages.
[17:17] <rhagu> c_14 it is running at the moment, will probably take about 2h, the last time I ran the command I mentioned, no errors showed up. Does this command check everything (audio, subtitles, video), or just video?
[17:18] <c_14> It'll check one video stream and one audio stream.
[17:18] <c_14> add -map 0 to check all streams
[17:24] <rhagu> thanks
[17:26] <rhagu> After a list of streams I get: "Number of stream maps must match number of output streams"  using  "ffmpeg -map 0 -i my.mkv -f null /dev/null"
[17:27] <c_14> ffmpeg -i my.mkv -map 0 -f null /dev/null
[17:28] <zenny> Hi, I am trying to capture video and audio from webcam with v4l2 drivers. I would like to capture one video stream with libaac and another audio stream with pcm_s16le separately from the same webcam source. Tried with: ffmpeg -f alsa -ac 2 -acodec pcm_s16le -i hw:2,0 -f v4l2 -vcodec h264 -r 30 -s 1920x1080 -i /dev/video0 -f alsa -ac 2 -i hw:2,0 -map 0:0 -c:v copy -c:a copy VIDEO+AUDIO.mp4 -map 1:0 -c:a pcm_s16le AUDIO_ONLY.wav gettin
[17:29] <rhagu> c_14 I changed it to ffmpeg -i my.mkv -map 0 -f null /dev/null   but still the same: Number of stream maps must match number of output streams
[17:30] <c_14> ffmpeg -f alsa -ac 2 -c:a pcm_s16le -i hw:2,0 -f v4l2 -c:v h264 -r 30 -video_size 1920x1080 -i /dev/video0 -map 0 -map 1 -c copy VIDEO+AUDIO.mp4 -map 0 -c:a pcm_s16le AUDIO_ONLY.wav <- zenny
[17:34] <zenny> c_14: thanks, but with your suggestion it produced "Could not find tag for codec pcm_s16le in stream #0, codec not currently supported in container" error in Input section and "Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument" in the output section.
[17:34] <rhagu> c_14 http://pastebin.com/gXADWAG6
[17:35] <c_14> zenny: get rid of the -c:a pcm_s16le before -i hw:2,0
[17:36] <c_14> rhagu: you're using libav, either see #libav for support or download a static build of ffmpeg/build from source.
[17:36] <c_14> http://johnvansickle.com/ffmpeg/
[17:36] <rhagu> c_14 thanks, I will google libav
[17:37] <zenny> c_14: with -c:a pcm_s16le before -i hw:2,0 also give the error as before (see http://pastebin.geany.org/EK4hR/)
[17:38] <c_14> zenny: mp4 doesn't support pcm_s16le audio
[17:38] <c_14> Either use a different codec or a different container.
[17:39] <c_14> ie switch -c copy to -c:v copy -c:a aac or .mp4 to .mkv
[17:44] <zenny> c_14: Thanks, this command worked: 'ffmpeg -f alsa -ac 2 -i hw:2,0 -f v4l2 -c:v h264 -r 30 -video_size 1920x1080 -i /dev/video0 -map 0 -map 1 -c:v copy -c:a libfdk_aac VIDEOnAUDIO.mp4 -map 0 -c:a pcm_s16le AUDIO_ONLY.wav'
[17:45] <zenny> c_14: what is the difference between '-map 0 -map 1' and '-map 0:0 -map 1:0'?
[17:48] <c_14> -map 0 maps the whole first file -map 0:0 maps the first stream of the first file
[17:50] <zenny> c_14: thanks a zillion for explanation, that is where I have been messing with.
[18:29] <bencc> anyone tried transcoding with ffmpeg and google native client? pnacl?
[18:53] <zenny> c_14: the stream capture with both and audio and video does not sync as the audio is always 4 seconds shorter than the video eventhough the streams are from the same webcam. Any clue?
[18:54] <c_14> Add -itsoffset 4 before -i hw:2,0
[18:54] <c_14> might help
[19:10] <relaxed> I think -itsoffset needs time stamps to work, so you'll probably have to use it on the output afterwards.
[19:12] <relaxed> so, ffmpeg -i output -itsoffset 4 -i output -map 0:v -map 1:a -c copy newoutput
[19:54] <pagios> is mpeg-dash supported by all PC browsers?
[20:02] <skwaap> Hello.  I'm trying to extract a subtrack from an mp4, and I'd like it to be accurate (not just keyframe).  I'd also like to avoid re-encoding the *whole* video to do this.  What would be a reasonable approach for this?
[20:02] <skwaap> My current thought is to encode a small piece at the beginning for accuracy (up to a keyframe), stream copy the rest, and put them together with the concat demuxer.  Does this seem reasonable?
[20:03] <sacarasc> Kinda fiddly to do, but it should work.
[20:04] <skwaap> Okay, thanks.  I'm having trouble with the concat demuxer
[20:05] <skwaap> when I stream copy an mp4, and re-encode a different mp4, I can't get them to concat
[20:05] <skwaap> presumably I need to change some of the re-encoding settings so that the properties of the mp4s match.  I'm not exactly sure what needs to be changed, tho.
[20:14] <skwaap> So I guess now my problem is:  I'm trying to concatenate 2 mp4s with the concat demuxer.  I'm willing to re-encode one of them.  What options do I need to use to make the concat demuxer work?
[20:16] <sacarasc> You're probably better using one of the other concat ways... Filter maybe.
[20:17] <skwaap> hmm
[20:17] <skwaap> that requires me to re-encode, right?
[20:17] <skwaap> both pieces?
[20:17] <skwaap> or no?
[20:23] <BtbN> remux the mp4s to mpegts, concat those, remux back
[20:25] <skwaap> kk
[20:25] <skwaap> and I can stream copy when I copy to mpegs?
[20:29] <BtbN> you can just concat the two ts files
[20:30] <skwaap> oh, okay
[20:30] <skwaap> so something like
[20:30] <skwaap> ffmpeg -i vid.mp4 -codec copy -ss spot1 -t duration out1.ts
[20:30] <skwaap> ffmpeg -i vid.mp4 -acodec copy -vcodec libx264 -ss spot2 -t duration out2.ts
[20:30] <skwaap> then
[20:31] <rubidious> Hello. I am trying to losslessly join some .mp4 files (which were originally mts, but converted with ffmpeg). However when I do 'ffmpeg -i "concat:file1.mp4|file2.mp4" -c copy output.mp4', output.mp4 contains only the video/audio from file1.mp4. Am I crazy?
[20:31] <skwaap> I can just concatenate the two .ts files
[20:31] <c_14> rubidious: https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files
[20:32] <skwaap> then ffmpeg -i combined.ts -codec copy out.mp4
[20:32] <skwaap> something like that?
[20:32] <skwaap> I'll try
[20:35] <pagios> does chrome on linux support smooth streaming?
[20:40] <rubidious> c_14: thanks, I was not aware that the concat protocol only worked for certain formats
[20:42] <skwaap> when I do something like:  ffmpeg -i vid.mp4 -acodec copy -vcodec libx264 -ss spot2 -t duration out2.ts, the video and audio end up out of sync.
[20:42] <skwaap> and when I stream copy I can't play the resulting .ts
[20:42] <skwaap> is there something else I should do when remuxing to a .ts?
[20:47] <c_14> What I would do is do the video cuts separate from the audio cuts.
[20:47] <c_14> ie, cut the video, concat those (without any audio track)
[20:47] <skwaap> right
[20:47] <c_14> then cut the audio track and mux it back in
[20:47] <skwaap> then put the audio track back in later
[20:47] <skwaap> okay
[20:47] <skwaap> that makes sense
[20:47] <skwaap> -an means no audio, right?
[20:48] <c_14> yep
[20:49] <Popara> Hello, i have the following command: ffmpeg -i URL -codec copy -f segment -segment_format flv -segment_time 10 -segment_list_size -segment_list test.flv test%04d.flv
[20:49] <skwaap> thanks
[20:49] <blippyp> skwaap: https://www.ffmpeg.org/ffmpeg-bitstream-filters.html - look at section 2.4 h264_mp4toannexb
[20:49] <Popara> It is possible to remove the timestamps from these segments so that the player will not end if it reads the first segment?
[20:49] <Popara> cause it reads the first segment and then stops because flv contains i think the timestamps data
[20:49] <Popara> with mpegts is fine but i want with flv
[20:50] <pagios> does chrome on linux support smooth streaming?
[20:50] <pagios> is smooth streaming delivered in a player?
[20:50] <pagios> any other way to deliver it?
[20:52] <skwaap> blippyp: okay, thank you!
[21:11] <BoRiS> Hi guys
[21:13] <BoRiS> I have written a patch to fix issues with the latest ffmpeg from git and the changes to xcb shape inside ffmpeg that isn't compatible with the latest libxcb and breaks ffmpeg with the error message "xcbgrab.c:(.text.unlikely+0x52c): undefined reference to `xcb_shape_rectangles'"
[21:14] <BoRiS> when compiling
[21:30] <c_14> https://ffmpeg.org/developer.html#Contributing
[21:38] <Popara> c_14 any help to my problem plz ? :(
[21:43] <c_14> I know of know way to write flvs without timestamps, nor do I quite understand your problem.
[21:50] <BoRiS> Submitted my patch to the ffmpeg-devel mailing list.
[22:46] <zenny> Thanks to c_14 and relaxed for their inputs and I say goodnight.
[23:20] <Kip> is there a way to read a .mpls from \BDMV\PLAYLIST\ which is already on my hard drive? I only kept the BDMV folder
[23:21] <c_14> Try the bluray demuxer?
[23:26] <Kip> c_14, https://bpaste.net/show/e9fb6b969601
[23:27] <c_14> It's looking for the index file? Do you have that somewhere?
[23:27] <Kip> no
[23:30] <c_14> Try passing it the mpls file directly?
[23:33] <pagios> anyone here?
[23:33] <pagios> hello
[23:33] <pagios> ping
[23:34] <Kip> c_14, https://bpaste.net/show/fe03e7472c1e
[23:36] <c_14> Kip: try -playlist 0 bluray:"foobar\Akira\"
[23:39] <Kip> c_14, https://bpaste.net/show/8a86104c768b
[23:40] <c_14> yay
[23:40] <c_14> Now just give it an output file.
[23:40] <c_14> eh wait
[23:40] <c_14> no
[23:40] <c_14> add a -i before bluray
[23:41] <c_14> I forgot about that.
[23:46] <feliwir> hello, i updated to ffmpeg 2.4.2 and all the sudden my codec_describtor is NULL
[23:47] <c_14> From what version did you update?
[23:47] <feliwir> from 2.2.2
[23:48] <c_14> Did you read APIChanges?
[23:48] <Kip> c_14, https://bpaste.net/show/60608dee3076
[23:48] <feliwir> no, i didn't expect any major changes
[23:48] <feliwir> did you remove the codec_describtor?
[23:49] <c_14> I didn't do anything, and in any case, shouldn't it be descriptor?
[23:49] <feliwir> ye :)
[23:50] <feliwir> i used to do the following: m_codecCtx->codec_descriptor->props ,but this doesn't work anymore all the sudden because the descriptor is NULL
[23:51] <c_14> Kip: I find the mix of forward and backslashes in the output delightful, not sure if that's an issue though.
[23:54] <c_14> feliwir: http://sprunge.us/UaTN <- first, I think it's called avcodec_descriptor and second the source says you should be using getters/setters
[23:55] <c_14> It should still be there though.
[23:57] <feliwir> there is nothing called avcodec_descriptor
[23:58] <feliwir> but i gonna try ur hint the getter
[00:00] --- Mon Nov 24 2014


More information about the Ffmpeg-devel-irc mailing list