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

burek burek021 at gmail.com
Sat Jul 5 02:05:02 CEST 2014


[00:54] <lkiesow> Is there a good way to extract the last frame from a video? I can run ffprobe to get the number of frames of the video and then the select filter to get the last frame, but that is really slow. I could use -ss to fast-seek to nearly the end, but then I will get a different frame count in the select filter
[00:54] <lkiesow> Any ideas?
[00:56] <lkiesow> So, this works:   ffmpeg -i in.mp4 -filter:v 'select=eq(n\,52373)' -r 1 -frames:v 1 out.jpg   but is really slow on a longer video
[01:23] <lkiesow> ok, found a solution, I'm just seeking nerly to the end and then extract every frame but make them overwrite each other:  ffmpeg -ss 2093 -i in.mp4 -updatefirst 1 out.jpg
[03:41] <rcombs> http://www.ffmpeg.org/ffmpeg-filters.html#Options <-- does "input aspect ratio" in this section refer to display DAR or SAR?
[03:43] <c_14> dar
[03:43] <rcombs> perfect, thanks
[03:43] <c_14> if you mean the -1 part
[03:43] <rcombs> the -1/-(n>1) part
[03:44] <c_14> yep
[03:44] <rcombs> and also force_original_aspect_ratio
[03:45] <c_14> yep, most of the time if something mentions the aspect ratio you can assume the dar
[03:47] <rcombs> yeah, just wanted to make sure
[03:47] <rcombs> now, what I really need here is a combination of force_original_aspect_ratio and x/y=-4
[03:48] <c_14> What are you trying to do?
[03:49] <rcombs> "scale=x=min(<max width>,iw):y=max(<max height>,ih):force_original_aspect_ratio=decrease"
[03:50] <rcombs> and then, on top of that, I need the final resolution's x and y values both to be multiples of 4
[03:50] <rcombs> but I think I'll just tweak the filter code
[03:54] <c_14> you can handle the divisible by 4 part with trunc(expression/4)*4
[03:55] <c_14> But that'll mess with your force_original_aspect_ratio
[03:55] <c_14> or well, the force will override that
[03:56] <relaxed> why not use pad
[04:01] <rcombs> oh, that works
[08:43] <jmleo> Hi there
[08:44] <jmleo> I have a broken mp4 file, ffmpeg returns :
[08:44] <jmleo> video.mp4: Invalid data found when processing input
[08:44] <jmleo> I know that codecs inside arre h264 and aac
[08:44] <jmleo> Is it possible to create a new stream which would be a repaired mp4 ?
[09:43] <jmleo> I tried this :
[09:43] <jmleo> http://pastebin.com/w0LUAgc2
[10:15] <luc4> Hello! Anyone who knows where to find info on how to convert the avcc stream inside a mp4 to annex b?
[10:20] <Darkfang> Hi. I'm trying to extract a RAW HEVC bitstream from an HEVC mkv file. I ran this command:
[10:20] <Darkfang> ffmpeg -i Sintel.mkv  -an -vcodec copy output.hevc
[10:20] <Darkfang> But I get a weird message about non monotonically increasing dts in muxer and the resulting bitstream is invalid....
[10:35] <heftig-z> gstreamer's ximagesrc shows tearing that ffmpeg's x11grab doesn't (and the latter had lots and lots of testing showing none). any idea what it could be doing differently?
[10:40] <kz1> does ffserver decode/encode ?
[11:46] <jmleo> anyone to help on mp4 repair ? I tried this http://pastebin.com/w0LUAgc2
[12:02] <sfan5> Darkfang: try adding -f rawvide
[12:02] <sfan5> rawvideo*
[12:31] <luc4> Hello! I'm trying to mux a h264 stream into an mp4. Anyone who knows if I can extract the timestamps of the frames from the h264 stream? I know that the stream has a variable framerate, so I'll need the timestamps to provide those to ffmpeg.
[15:38] <Darkfang> sfan5: Did not help... I used mkvextract. Much faster than trying to figure it out :)
[15:45] <dannyzb> When converting to HLS i need keyframes every +-10 seconds .. does -g 125 work with -vcodec copy ?
[16:11] <relaxed> dannyzb: no
[16:11] <dannyzb> is there any way to use vcodec copy and add keyframes ?
[16:12] <relaxed> no
[16:13] <dannyzb> good to know , thanks
[16:20] <Mavrik> think about what you're asking
[16:20] <Mavrik> if you're copying the stream you can't modify it
[16:25] <dannyzb> yes i understand
[16:25] <dannyzb> i just hoped that copy with keyframes would only change whats needed
[16:25] <dannyzb> the complexity of that is obvious , but you can always hope
[16:26] <dannyzb> half the sites online on creating HLS streams have broken commands then ... always wondered why they used COPY+KEYFRAMES
[16:27] <Mavrik> uh
[16:27] <Mavrik> keyframes are integral to structure of encoded streams
[16:27] <Mavrik> you can't just throw them in there without reencoding everything.
[16:37] <Luca__> Hello! Anyone here who knows if it is possible to use ffmpeg libs in a Windows Store App?
[17:02] <dannyzb> Mavrick : theoretically , you could add keyframes only where they are missing , then you only reencode frames between them and the adjacent keyframes - easily saves a lot of encoding work
[17:02] <dannyzb> most videos IMO should have almost enough keyframes from the get-go :thats why the broken HLS encoders everywhere work anyway
[17:12] <dannyzb> work anyway mostly * it does break some videos
[17:21] <vkrishn> hi
[17:23] <vkrishn> I can play some mp4 on android 4x (jellybean), but not on 2.1(eclair)
[17:23] <vkrishn> though 2.1 says it supports mp4/h.264
[17:24] <vkrishn> any help how to convert them would be nice ?
[17:24] <Hello71> i'm putting money on profile
[17:39] <dannyzb> vkrishn : what phone , how much ram does it have , what ffmpeg profile , what audio encoding and how did you want to play it back ? (with what app )
[17:41] <dannyzb> android 2.1 supports up to baseline profile IMO in most cases
[17:42] <dannyzb> i've seen videos on bittorrent go beyond high profile so i wouldn't be surprised if you can't play many of them
[17:42] <JEEB> AVC decoding capabilities are _fully_ dependant on the hardware
[17:42] <JEEB> not the android version
[17:42] <JEEB> if your piece of hardware has a crappy ASIC, then you deal with that. If it has a good ASIC, then you can enjoy that
[17:47] <dannyzb> JEEB : Finished my big project :D no more noob questions again ever
[17:47] <JEEB> dannyzb, don't worry - you will always end up at such a point again somewhere sometime
[17:48] <dannyzb> I guess you can always condescend ;)
[17:57] <Luca__> Hello! Anyone who was able to use ffmpeg libraries on winrt?
[18:03] <dannyzb> Luca: Handbrake should have a version for WinRT
[18:03] <dannyzb> You better give up on using normal libraries on WinRT .. stuff needs to be compiled with visual studio there .. UGH
[18:05] <Luca__> <dannyzb>: well, visual studio can also be build on the command line. Also Qt is portable to winrt. It is 10^9 times more complex than any other OS but it is possible...
[18:07] <dannyzb> Luca__ : theoretically it's Tegra3 so .. that preset might work .. but why ?
[18:08] <Luca__> <dannyzb>: I never said ARM :-) anyway yes, both ARM and x86. Why what?
[18:09] <dannyzb> completely unrelated things
[18:09] <dannyzb> same name , different systems
[18:13] <dannyzb> on the surface pro try the regular ffmpeg build for windows
[19:12] <vkrishn> dannyzb, got busy with some work, my mobile is Dell XCD35
[19:14] <vkrishn> sorry,  repeating question,
[19:14] <vkrishn> I can play some mp4 on android 4x (jellybean), but not on 2.1(eclair), Delll XCD35
[19:15] <vkrishn> but on newer mobile phone like samsung galaxy star s5280 they play well
[19:16] <BtbN> does a that old android version even support aac?
[19:16] <vkrishn> I even have few mp4 that play on both,
[19:16] <vkrishn> yes, eAAC player
[19:18] <vkrishn> I think http://www.gsmarena.com/ has a nice hardware profile of both phones
[19:19] <JEEB> <JEEB> AVC decoding capabilities are _fully_ dependant on the hardware
[19:19] <JEEB> <JEEB> not the android version
[19:19] <JEEB> <JEEB> if your piece of hardware has a crappy ASIC, then you deal with that. If it has a good ASIC, then you can enjoy that
[19:20] <vkrishn> JEEB, any way of converting the newer mp4 files to same format as one that plays ?
[19:20] <JEEB> only by re-encoding :P
[19:20] <JEEB> -profile:v baseline -level:v 30
[19:41] <vkrishn> JEEB, thanks
[19:42] <vkrishn> ffmpeg complained about -strict experimental, so added it and and it I have re-ended one file
[19:42] <vkrishn> re-encoded* ;)
[19:43] <JEEB> vkrishn, you probably want to just copy the audio over if it's AAC :P
[19:43] <JEEB> -c:a copy
[19:43] <vkrishn> I have ffmpeg that comes with knoppix 7.2
[19:43] <vkrishn> ok will re-do
[19:50] <vkrishn> hmmm... ffmpeg version 0.8.6-6 does not recognize "-c:a copy" but avconv version 0.8.7-6
[20:20] <mowfask> Hey everyone. I'm trying to stream via RTP using libavformat. When av_guess_format()ing "rtp", neither AVFMT_NOFILE nor AVFMT_NOSTREAM are set. Does that mean I have to open the stream 'like a file' and also create an AVStream?
[20:42] <vkrishn> JEEB, ffmpeg -i test.mp4 -profile:v baseline -level:v 30 -c:a copy -strict experimental a2.mp4 ?
[20:43] <vkrishn> a2.mp4 works on samsung mobile but not dell
[20:50] <vkrishn> ok trying again with more options like -ar 44100
[20:50] <vkrishn> I guess -acodec copy =  -c:a copy
[20:51] <sfan5> yes, those are the same
[20:51] <vkrishn> thanks
[20:53] <vkrishn> brb, need to go offline to test on all devices
[21:08] <vkrishn> JEEB, still cannot play on older mobile (Dell)
[21:11] <vkrishn> tried https://dpaste.de/Uwju , minimum (1st) and with options I could think okish (2) and almost lots of variables in between
[21:16] <vkrishn> I have a mp4 that plays on both devices, is there a way of getting all its meta info, that I can paste for you look at ?
[21:27] <JEEB> vkrishn, I'd be surprised if the audio was the reason so you can just keep the audio as-is as long as it's AAC or something
[21:27] <JEEB> also you don't need to change the rate I'm pretty sure for the vieo
[21:27] <JEEB> *video
[21:27] <JEEB> can you also actually post the _output_ of ffmpeg as well :P
[21:27] <JEEB> in the pastebin
[21:28] <JEEB> but yeah, if it can't deal with profile baseline and level 3.0 then it just sucks and has nothing to do with the android version
[21:28] <JEEB> you could try lowering resolution to something like 320x240
[21:30] <vkrishn> one that plays on both has 400x292
[21:30] <vkrishn> I tried to mimic its details
[21:31] <vkrishn> just note that samsung galaxy star s5280 play all files I have
[21:31] <vkrishn> plays
[21:31] <JEEB> of course, the ASICs are different :P
[21:31] <JEEB> ASICs being the stuff that actually handles the decoding
[21:33] <vkrishn> paste the output of -> ffmpeg -i test.mp4 -profile:a baseline -level:v 30 -acodec copy -strict experimental c2.mp4 ?
[21:33] <JEEB> no need for -strict experimental when not encoding AAC: P
[21:33] <JEEB> only the libavcodec AAC encoder needs that flag
[21:33] <vkrishn> ok will try
[21:34] <vkrishn> ffmpeg -i test.mp4 -profile:v baseline -level:v 30 -acodec copy c2.mp4
[21:39] <vkrishn> https://dpaste.de/nfG8
[21:39] <JEEB> yeah
[21:40] <JEEB> switch to the avconv binary if you want to use a debian-based system :)
[21:40] <JEEB> same settings otherwise
[21:40] <vkrishn> ok
[21:40] <JEEB> which is why -c:v|a didn't work for you either :P
[21:41] <JEEB> the profile isn't getting through, as you can see libx264 is encoding main, not baseline
[21:42] <vkrishn> ok avconv says: [libx264 @ 0x8090280] profile Constrained Baseline, level 3.0
[21:43] <JEEB> yup
[21:43] <vkrishn> :)
[21:44] <vkrishn> https://dpaste.de/mhCq
[21:44] <JEEB> (debian uses Libav instead of FFmpeg, so the correct place to get support for it would be #libav , just fyi)
[21:45] <JEEB> yes, this looks more correct
[21:45] <vkrishn> ok going offline to test, thanks
[21:45] <vkrishn> brb
[22:29] <vkrishn> JEEB, here is mp4 file that works on both, https://dpaste.de/x9S3, but the re-encoded works only on newer mobile
[22:31] <vkrishn> and the z11.mp4 did not work :(
[22:31] <vkrishn> but then I guess I should mv to #libav
[22:31] <JEEB> and you're sure it's not the resolution?
[22:32] <vkrishn> 1599991_209340295923983_490505621_n.mp4 has 400x292 - plays in both DELL(older) and Samsung
[22:33] <JEEB> ok, what level does it have?
[22:34] <vkrishn> get encoded to [libx264 @ 0x8090280] profile Constrained Baseline, level 3.0
[22:34] <JEEB> no
[22:34] <JEEB> the input :P
[22:34] <vkrishn> but don't know it orignal
[22:34] <vkrishn> yes the input level
[22:34] <JEEB> no, that's output
[22:34] <JEEB> profile and level are inscribed in the bit stream for the decoder to read
[22:34] <JEEB> you could try grabbing a static ffmpeg binary
[22:34] <JEEB> I think it nowadays outputs level as well
[22:34] <JEEB> and not only profile
[22:35] <vkrishn> ok, url pls
[22:35] <JEEB> http://ffmpeg.gusari.org/static/
[22:38] <vkrishn> ok I think 2.1
[22:38] <vkrishn> I did ffmpeg -i 1599991_209340295923983_490505621_n.mp4  z15.mp4
[22:38] <JEEB> no need to set output to just view the info
[22:38] <vkrishn> and I guess it tried to gess
[22:38] <JEEB> ffmpeg -i welp.mp4
[22:38] <vkrishn> guess
[22:38] <JEEB> pastebin it
[22:39] <vkrishn> ok will do with newer static ffmpeg
[23:16] <Filarius> how I can ask ffmpeg to wait until file will be unblocked for reading? in windows I use single image file for kind of video streaming by rapidly replacing this file by new frames
[23:18] <Filarius> http://pastebin.com/zzCxB4C4
[00:00] --- Sat Jul  5 2014


More information about the Ffmpeg-devel-irc mailing list