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

burek burek021 at gmail.com
Fri Jul 17 02:05:01 CEST 2015

[00:17:41 CEST] <benny-> hi, i have some file demuxed and got an ac3 stream which plays fine in mediaplayer and vlc, when i trie to remux it with tsremuxer, it says no stream is detected for the ac3 file. is it possible to reencode it with ffmeg (if possible lossless)
[00:19:09 CEST] <benny-> also any other format would be fine if the multichannel data doesnt get lost
[00:19:25 CEST] <c_14> if you want it lossless, just encode to a lossless codec
[00:19:40 CEST] <c_14> flac/pcm/whatever
[00:19:51 CEST] <c_14> It'll probably be bigger than the source though.
[00:19:57 CEST] <c_14> Since AC3 isn't lossless
[00:20:59 CEST] <benny-> how about aac? is it capable of multichannel?
[00:21:18 CEST] <c_14> up to 8
[00:21:20 CEST] <benny-> with a high bitrate i may not notice any quality difference
[00:21:41 CEST] <c_14> If you care about quality, you'll want a build with libfdk_aac (which means you'll have to build it yourself)
[00:23:06 CEST] <benny-> i guess thats not what portage offers me as useflag called aacplus!?
[00:23:51 CEST] <c_14> no
[00:24:03 CEST] <c_14> It's the fdk flag
[00:24:23 CEST] <benny-> thanks, i got that, so i've just to rebuild with that useflag.
[00:26:15 CEST] <benny-> any special parameters for the encoding needed or does ffmpeg automaticly make a multichannel file?
[00:26:33 CEST] <c_14> If the input is multichannel, the output is automatically multichannel as well.
[00:26:43 CEST] <benny-> thanks much \o/
[01:26:21 CEST] <bencc> can I ask ffmpeg to give me a single image from a video every time?
[01:26:49 CEST] <bencc> something like '-f image2pipe' but for output instead of input
[04:31:10 CEST] <seeit> Is ffserver capable of taking an input from a stream and handling it if it has to buffer?
[08:07:13 CEST] <PSvils> Hey everyone!
[08:08:07 CEST] <PSvils> I'm getting a strange error compiling ffmpeg with libvpx for android ARM.
[08:08:13 CEST] <PSvils> (It's working on Android x86)
[08:08:49 CEST] <PSvils> but trying to encode webm, at avcodec_open2, I get an invalid parameter error, with the detailed error being "g_lag_in_frames out of range [..0]"
[08:09:10 CEST] <PSvils> this doesn't happen on ARM, which is why I'm a bit stumped, and can't find a lot of info on this.
[08:09:21 CEST] <PSvils> I really hope some of you guys have any ideas at all :)
[08:36:31 CEST] <PSvils> updating ffmpeg, seeing if that will work.
[09:23:22 CEST] <PSvils> sadface, updated ffmpeg, not working at all now.
[09:54:15 CEST] <Mavrik> hrmf, can't find in changelog... when was HLS demuxer added?
[09:59:24 CEST] <feliwir> hey, how do i stream videos from memory?
[10:05:19 CEST] <chungy> feliwir: What do you mean "from memory"?
[10:07:33 CEST] <feliwir> chungy: i want ffmpeg when it needs new data and i provide it to it. For exammple i have my video in a zip file and want to decode it
[10:08:44 CEST] <chungy> Trying to make it read the file within the zip? you could use avfs... or maybe pipe it in with bsdtar.
[10:09:05 CEST] <feliwir> chungy: i am talking about c++ code
[11:04:31 CEST] <Power2All> Hi, I got a question regarding FFMPEG and HLS segmenting. Hope anybody can help with this.
[11:05:01 CEST] <Power2All> I succesfully got segmenting working for HLS, using also WRAP to remove the old TS files.
[11:05:16 CEST] <Power2All> BUt, the m3u8 file keeps growing and growing.... It doesn't clean up the old files in there.
[11:05:32 CEST] <Power2All> Could anybody tell me if this is a bug, or do I need something else to put in the parameter to clean it up ?
[11:08:19 CEST] <Power2All> Nevermind, seems I did forgot a parameter (segment_list_size), trying it out now anyway
[11:20:11 CEST] <Quixxx> Question: How does encoding speed scale with resolution? Is it pretty linear in terms of pixels per second or does it slow down more with higher resolutions?
[11:20:34 CEST] <Quixxx> For the sake of argument lets say we are encoding with h.264... or vp8.
[12:00:23 CEST] <AstralStorm> hello, I got this message when trying to use aac encoder from my ffmpeg-using application (via libraries)
[12:00:39 CEST] <AstralStorm> "The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it."
[12:01:05 CEST] <AstralStorm> how can I enable those experimental codecs?
[12:01:21 CEST] <AstralStorm> (yes, I know it's experimental, no, I cannot use another codec)
[12:03:10 CEST] <AstralStorm> I'm using av_guess_codec to pick it
[12:03:32 CEST] <AstralStorm> potentially have to pass something to avcodec_open2 in the AVDictionary, but what?
[12:07:53 CEST] <AstralStorm> found it, strict_std_compliance
[12:09:44 CEST] <AstralStorm> (in AVCodecContext no less)
[12:24:51 CEST] <Power2All> mmm
[12:24:52 CEST] <Power2All> Thats easy
[12:25:09 CEST] <Power2All> -strict experimental -c:a libfaac
[12:25:17 CEST] <Power2All> Thats what I use to use the libfaac lib.
[12:25:35 CEST] <Power2All> Google for the parameters to configure the bitrate and such.
[12:25:42 CEST] <Power2All> Normally that's done with -b:a for example.
[12:26:38 CEST] <Power2All> But I got a issue too... Somehow, the TS files with Apple HLS, it's adding a 3rd channel, that contains some kind of "menu" metadata.
[12:26:45 CEST] <Power2All> at ID 4096
[12:33:21 CEST] <Power2All> Looks like mediastreamvalidator of Apple doesn't understand the MENU metaheader in the file.
[12:33:42 CEST] <Power2All> The ID's of audio and video are 1 and 2, but the ID's are actually set as 256 and 257/
[12:38:10 CEST] <Mavrik-> Power2All, what.
[12:38:16 CEST] <Mavrik-> Please don't use libfaac :P
[12:41:48 CEST] <AstralStorm> Power2All: you didn't read my question, I'm using the libraries :)
[12:42:03 CEST] <AstralStorm> plus, libfaac is terrible, the experimental one is much better
[12:42:42 CEST] <AstralStorm> anyway, I've found the answer, AVCodecContext::strict_std_compliance, set it to FF_COMPLIANCE_EXPERIMENTAL
[12:55:01 CEST] <Mavrik> Yes, that :)
[12:55:11 CEST] <Mavrik> (Sorry, got distracted before telling you the answer -_- )
[13:22:35 CEST] <Power2All> Meh, I do not need ultra good quality audio tbh.
[13:23:02 CEST] <Power2All> Seems to be normal that ffmpeg creates a menu stream in de TS file.
[13:26:11 CEST] <BtbN> It shouldn't do that by default
[13:48:14 CEST] <jonascj> Hi all. Can I hope to add 50-200% to a video's length (by adding all black frames) without having it increase 50%-200% in size? Is there a codec smart enough to make all black frames take up almost no space?
[13:48:46 CEST] <BtbN> That's how all video codecs work
[13:49:08 CEST] <BtbN> 100% static frames should need close to zero bandwidth
[13:50:29 CEST] <jonascj> BtbN: So a few hours worth of all black video should be doable within 10-100 MB?
[13:51:49 CEST] <jonascj> I suppose so, ignore that question.
[13:54:12 CEST] <jonascj> Any hints on how I should do this smartest? The input video specs are these http://paste.linux.chat/view/5fdd6ea8 and I want to add a given length of black video, no audio onto the end of that video. Should I create an all black video matching the other video and concatanate them?
[14:48:12 CEST] <jonascj> Hmm, demux concat'ing the output of "ffmpeg -loop 1 -i black.png -c:v libx264 -t 300 -r 29.97 black.mp4" with a video with these specs http://paste.linux.chat/view/5fdd6ea8 did not work. It produced errors as soon as it got to the black.mp4 file, and the concat'ed output file was still the length of input.mp4, not length of input.mp4+black.mp4.
[14:54:00 CEST] <BtbN> I think you can't concat mp4 files
[14:54:03 CEST] <BtbN> Use mpeg-ts
[14:56:39 CEST] <jonascj> BtbN: It worked fine with two times the black.mp4
[14:57:15 CEST] <jonascj> I thought it was because the two video files did not match in codec or similar
[14:57:40 CEST] <BtbN> The mp4 demuxer doesn't handle it very well if the smallest detail changes
[14:57:43 CEST] <BtbN> mpeg-ts doesn't care at all
[14:57:52 CEST] <BtbN> you can change absolutely everything
[14:58:20 CEST] <BtbN> so remux to mpeg-ts, concat, and then mux the result as mp4 again, if you realy need mp4
[14:59:57 CEST] <jonascj> "ffmpeg -i input.mp4 -c copy -map 0 output.ts" ?
[15:01:13 CEST] <Mavrik> BtbN, huh
[15:01:33 CEST] <Mavrik> if you change SPS/PSS most decoders will choke on TS as well
[15:01:49 CEST] <BtbN> stream changes are perfectly fine in mpeg-ts
[15:02:03 CEST] <BtbN> it frequently happens in TV live broadcasts
[15:03:34 CEST] <jonascj> This is what I tried to concat http://paste.linux.chat/view/ed326d1b
[15:04:09 CEST] <Mavrik> BtbN, no.
[15:04:12 CEST] <BtbN> shouldn't be a problem, just try with mpeg-ts
[15:04:54 CEST] <Mavrik> BtbN, if you'd try something like that even the Cisco and other broadcasting muxers are going to just kill your signal ;)
[15:04:56 CEST] <BtbN> also, your ffmpeg version is horribly out of date.
[15:05:19 CEST] <BtbN> Mavrik, i have seen this happen a lot of times. Commercials start, stream-change to a diffrent resolution and framerate.
[15:05:24 CEST] <BtbN> It's documented and supported.
[15:05:36 CEST] <jonascj> BtbN: true on the version, I'm on an old system atm.
[15:06:08 CEST] <Mavrik> BtbN, ugh, no.
[15:06:15 CEST] <Mavrik> AR can change yes.
[15:06:29 CEST] <Mavrik> resolution? Certanly not. At least not on any DVB network.
[15:06:45 CEST] <Mavrik> Framerate? Maybe, because H.264 isn't really constant framerate.
[15:06:55 CEST] <jonascj> BtbN: the conversion to mpeg-ts, is that "ffmpeg -i input.mp4 output.ts"? Or do I need to specify the mpeg-ts format?
[15:07:03 CEST] <BtbN> No, that actualy happens. For some channels the commercials are still SD, and they just stream-change instead of transcoding them.
[15:07:08 CEST] <BtbN> jonascj, -c copy
[15:07:12 CEST] <BtbN> otherwise, yes
[15:08:12 CEST] <Mavrik> BtbN, yes, I've seen it, it killed most of our STBs
[15:08:13 CEST] <Mavrik> :)
[15:08:18 CEST] <Mavrik> and several mobile devices
[15:08:26 CEST] <Mavrik> I should be probably clearer :P
[15:08:31 CEST] <BtbN> It's a documented feature of mpeg-ts/dvb
[15:08:38 CEST] <BtbN> Of course it's not the same h264 stream
[15:08:41 CEST] <Mavrik> jonascj, "-codec copy", you don't wanna lose quality.
[15:08:46 CEST] <BtbN> one stream ends and another one imediately takes over
[15:08:56 CEST] <Mavrik> BtbN, ah, now I know what do you mean.
[15:09:04 CEST] <Mavrik> IIRC that has to be flagged.
[15:09:11 CEST] <BtbN> Yes, it's a stream-change
[15:09:23 CEST] <jonascj> "-codec copy" and "-c copy" is the same, right?
[15:09:27 CEST] <BtbN> yes
[15:09:28 CEST] <Mavrik> yp.
[15:09:42 CEST] <BtbN> But you realy should update your ffmpeg first
[15:09:52 CEST] <BtbN> most advice given here assumes the most recent version.
[15:09:59 CEST] <jonascj> It died requesting me to add "-bsf h264_mp4toannexb", now it is running without error, but it will take some time before I know if it worked or not
[15:10:18 CEST] <BtbN> remuxing should be fast
[15:10:38 CEST] <jonascj> now it is done :P
[15:19:03 CEST] <jonascj> BtbN: it worked perfect in mpeg ts format (the concatanation, that is).
[15:19:17 CEST] <BtbN> as expected
[15:20:49 CEST] <jonascj> For anyone with advanced audio/video/format/codec knowledge :)
[15:24:33 CEST] <BtbN> It doesn't take much to know that mp4 is a terrible container.
[15:24:45 CEST] <BtbN> It's only popular because powerfull companies are pushing it.
[15:28:34 CEST] <Mavrik> Well, it's not that terrible and makes sense for usage it was meant for.
[15:28:42 CEST] <Mavrik> But then some retard decided it's the right container to use for web streaming.
[15:28:45 CEST] <BtbN> No, it's awfull
[15:28:46 CEST] <Mavrik> or any other streaming.
[15:28:55 CEST] <BtbN> it's extremely complex, and has a bunch of issues
[15:29:05 CEST] <BtbN> It's especialy useless for streaming without hacks
[15:32:42 CEST] <Mavrik> Yeah, it was never meant for any kind of streaming.
[16:04:26 CEST] <vlad_> hi all! I have a question:
[16:05:44 CEST] <vlad_> I'm trying to trim certain portions from a video (__temp.mp4) into a final one (output.mp4)
[16:05:51 CEST] <vlad_> and I use this command: http://dpaste.com/24PJM7H
[16:06:26 CEST] <vlad_> but the output video doesn't have sound altough I use -c:a libfdk_aac
[16:06:46 CEST] <vlad_> can anyone help me solving this problem, please?
[16:11:07 CEST] <DHE> might try also adding "-map 0:a" so that it explicitly pulls in the audio as well
[16:14:38 CEST] <vlad_> DHE: -map 0:a -map [a11] ??
[16:15:56 CEST] <thebombzen> vlad_: Try reading this wiki article: https://trac.ffmpeg.org/wiki/How%20to%20use%20-map%20option
[16:16:04 CEST] <thebombzen> It explains how to use -map to select streams
[16:16:46 CEST] <vlad_> thebombzen: streams are actually video+audio?
[16:17:39 CEST] <thebombzen> vlad_: when you try to encode, it lists the stream mapping at the bottom. what does that say?
[16:22:13 CEST] <vlad_> thebombzen: I think you're asking for this: http://dpaste.com/0322750
[16:23:12 CEST] <thebombzen> vlad_: what is the full uncut ffmpeg output? Notice that the audio stream isn't listed there. That means it's not being mapped to the output.
[16:23:32 CEST] <DHE> vlad_: yes, did you try that?
[16:23:53 CEST] <vlad_> full uncut ffmpeg output of what?
[16:24:01 CEST] <vlad_> what command?
[16:24:51 CEST] <DHE> vlad_: try adding -map 0:a like you indicated
[16:25:02 CEST] <thebombzen> vlad_: the command you ran. Also did you try doing -map [a11] -map 0:a?
[16:25:17 CEST] <DHE> you're manually building the list of streams for the output, but only named one
[16:28:41 CEST] <vlad_> I'm actually very new to ffmpeg, and I came across that command, but I want the output to contain trimmed audio as well
[16:29:12 CEST] <vlad_> does the current command still trim video in a optimal way? is it a better way of doing it?
[16:31:51 CEST] <DHE> ah yes, the audio would be passed through unmodified...
[16:33:10 CEST] <DHE> the concat filter will process audio, but it needs to be explicitly specified
[16:33:38 CEST] <DHE> trimming requires the use of the atrim filter
[16:34:07 CEST] <DHE> so you'd have to mix and match with filter options like [0:a]atrim=....[audio1];..
[16:34:42 CEST] <DHE> also with concat you can do it all it one shot rather than several concat instances.
[16:35:56 CEST] <DHE> [vid1][aud1][vid2][aud2][vid3][aud3]..[vid6][aud6] concat=n=6:v=1:a=2 [videoout][audioout]
[16:36:15 CEST] <DHE> (I haven't actually tried this, just building on the filter documentation and examples)
[16:37:44 CEST] <vlad_> DHE: I have so many question right now
[16:38:06 CEST] <vlad_> 1) why is a=2 in concat=n=6:v=1:a=2  ??
[16:39:34 CEST] <DHE> oops, my bad
[16:39:40 CEST] <DHE> the example used 2 and I messed up
[16:39:42 CEST] <DHE> sorry
[16:40:26 CEST] <vlad_> 2) what is PTS-STARTPTS in setpts=PTS-STARTPTS ?
[16:50:47 CEST] <vlad_> DHE: how does this look: http://dpaste.com/30VV2ZF ???
[16:54:06 CEST] <vlad_> thebombzen: http://dpaste.com/30VV2ZF is it ok?
[16:55:28 CEST] <thebombzen> vlad_: I don't know, does it work?
[16:55:42 CEST] <vlad_> nope :(
[16:55:50 CEST] <thebombzen> what is the output then?
[16:56:48 CEST] <vlad_> http://dpaste.com/16B4GZF
[17:08:28 CEST] <thebombzen> vlad_: you need to use asetpts for audio, not setpts
[17:08:54 CEST] <vlad_> thebombzen: ok, thanks a lot :)
[17:08:56 CEST] <thebombzen> vlad_: https://ffmpeg.org/ffmpeg-filters.html very helpful page, yo. I would read it, mad utility
[17:09:15 CEST] <thebombzen> vlad_: or at least, search it when necessary
[17:15:24 CEST] <vlad_> thebombzen: is it possible to have multiple audio trims that may be overlayed ?
[17:15:52 CEST] <vlad_> so [0, 12] & [4, 7] ?
[17:17:03 CEST] <thebombzen> vlad_: if you're looking for amix, that's a filter. Check the filter page I linked, it's probably got what you want.
[18:45:10 CEST] <Derudaf> Hello chat, i got a question about muxing subtitles on a .mkv file, is there some one that maybe can help me ? :)
[19:05:06 CEST] <RobotsOnDrugs> not if you don't actually ask the question and then leave after a few minutes
[19:05:15 CEST] <thebombzen> haha
[19:05:52 CEST] <thebombzen> They should put "don't ask to ask, just ask" in the titlebar. I've seen that before. Not sure how much ithelps but at least it'll be there.
[19:07:03 CEST] <DHE> there's a variant where people will seem to be seeking one-on-one help. that must also be discouraged if at all possible.
[19:07:16 CEST] <RobotsOnDrugs> that's less common, but yes
[19:09:33 CEST] <vlad_> DHE, thebombzen thank you guy very much for your input, it really helped me a lot
[19:09:43 CEST] <vlad_> guys
[19:13:54 CEST] <podman> hey! if i have a video with non-square pixels, how can I use setsar to make sure the output video maintains the correct aspect ratio but uses square pixels instead?
[19:14:49 CEST] <durandal_1707> setsar='1/1' ?
[19:14:58 CEST] <sfan5> -vf scale=iw*sar:ih
[19:15:03 CEST] <sfan5> (https://ffmpeg.org/pipermail/ffmpeg-user/2011-November/003203.html)
[19:15:22 CEST] <podman> sfan5: thanks. one issue i have with that is when i try to do that the width/height are not divisible by 2
[19:15:28 CEST] <podman> which i need for h264
[19:15:37 CEST] <vlad_> DHE: thebombzen I have  a new question though :) ... using "atrim" I can trim from audio streams, is there a way to specify at what timestamp to put this "atrim"??
[19:16:16 CEST] <sfan5> podman: -vf scale='iw+mod(iw,2):ih+mod(ih,2)' can do that
[19:16:27 CEST] <vlad_> for example: I want [00:05.000-00:10.000] to be inserted at 00:00.000 in the output file
[19:16:50 CEST] <podman> sfan5: ah, interesting, I'll give that a try! then i can combine that scale with another scale if I need to get it to a different size?
[19:17:04 CEST] <sfan5> yes you can use multiple filters at one
[19:17:08 CEST] <sfan5> just add a comma between then
[19:17:25 CEST] <sfan5> like this: -vf scale=iw*sar:ih,scale='iw+mod(iw,2):ih+mod(ih,2)'
[19:17:27 CEST] <podman> right, excellent, i'll give that a shot
[19:18:24 CEST] <podman> sfan5: actually, the first scale is what causes the issue
[19:19:02 CEST] <podman> oh, wait
[19:19:04 CEST] <podman> nevermind
[19:19:05 CEST] <podman> hmm
[19:19:34 CEST] <podman> sfan5: does the iw in the second scale reflect the value of the first scale?
[19:19:47 CEST] <sfan5> yes
[19:19:52 CEST] <podman> oh
[19:19:57 CEST] <podman> alright, I'll play around with it
[19:20:17 CEST] <sfan5> the second filter operates on the frames produced by the first filter
[19:20:29 CEST] <podman> i think i might try this: scale='iw*sar:ih,min(iw+mod(iw,2),#{width}):-2'
[19:23:30 CEST] <podman> sfan5: that seems to have worked! thank you so much
[19:28:07 CEST] <ffmpegfanboy> I got a question about subtitles muxed on to an .mkv file, is there somebody that can help ? :)
[19:28:34 CEST] <sfan5> there are many people here, just ask
[19:29:59 CEST] <ffmpegfanboy> okay :) How do i set a subtitle as default, so when i for example play the mkv file in VLC the subtitles shows from the start, so i dont have to select the subtitle ? :)
[19:33:42 CEST] <ffmpegfanboy> hope that some one can help :)
[19:36:12 CEST] <podman> that sounds like a VLC setting as opposed to ffmpeg
[19:40:22 CEST] <ffmpegfanboy> can i pm you with the command podman ? :)
[19:50:21 CEST] <ffmpegfanboy> How do i set a subtitle as default, so when i for example play the mkv file in VLC the subtitles shows from the start, so i dont have to select the subtitle ? :)
[19:55:50 CEST] <pzich> ffmpegfanboy: based on my brief google search, I'm not seeing a simple way to do it with ffmpeg, but it looks like mkvpropedit will: http://stackoverflow.com/q/26956762
[19:56:41 CEST] <ffmpegfanboy> i will try, thanks pzich :)
[19:56:51 CEST] <sfan5> mkvmerge should be able to this, too
[19:57:21 CEST] <c_14> I think you can set stream metadata for mkv disposition=default
[19:59:36 CEST] <derpderpuz> sup yalls
[19:59:59 CEST] <derpderpuz> I've got a question about a little project I'm trying to do.
[20:01:29 CEST] <derpderpuz> I am currently wanting to write a script that will take a directory full of files, and split each file up into 10 second pieces of that video. for example: take a 100second video and make it into ten different 10 second videos
[20:02:00 CEST] <derpderpuz> so far I've got a script that will trivially grab the first 10 seconds of the video.. but im using bash
[20:03:14 CEST] <derpderpuz> As well, once I have the videos I have, I'd like to have them converted the audio and video streams to super high bitrates in the following formats MXF, MKV, OGG, NUT, and GBS
[20:03:54 CEST] <derpderpuz> I've used the b:v and b:a flags to alter the bitrate on some of the videos and I get an output file, but it doesn't reflect the bitrate changing.
[20:03:59 CEST] <sfan5> why super high bitrates?
[20:04:19 CEST] <sfan5> and for what purpose nut files?
[20:04:22 CEST] <derpderpuz> well I'm wanting to fuzz these formats
[20:04:25 CEST] <c_14> derpderpuz: What's your command?
[20:04:33 CEST] <derpderpuz> c_14: in regard?
[20:05:05 CEST] <c_14> You've used the flags but the bitrate didn't change, what's your complete command when you do that.
[20:05:07 CEST] <derpderpuz> the nut files are just some obscure format. I picked an obscure one just to be sure theres not too much fuzzing being done on it already
[20:05:12 CEST] <derpderpuz> oh okay
[20:05:16 CEST] <derpderpuz> let me check real quick.
[20:06:07 CEST] <sfan5> if you have little container overhead (cuz high bitrates) and do fuzzing you'll likely just modify the encoded video instead of the contain fmt structures
[20:06:08 CEST] <derpderpuz> ffmpeg -i input.whatever -b:v 1M -b:a 192k output.whatever
[20:06:26 CEST] <sfan5> container*
[20:06:33 CEST] <derpderpuz> fmt?
[20:06:37 CEST] <sfan5> format
[20:06:39 CEST] <derpderpuz> finite model thereoy?
[20:06:40 CEST] <derpderpuz> lol
[20:07:01 CEST] <derpderpuz> right right
[20:07:04 CEST] <derpderpuz> the reason that is
[20:07:29 CEST] <derpderpuz> because I'm building a smart fuzzer (partially) which is mainly aimed at the headers and end of streams
[20:07:44 CEST] <derpderpuz> my logic to fuzz encoded video is for rendering bugs
[20:08:05 CEST] <sfan5> uh
[20:08:15 CEST] <sfan5> how do you define 'correctly rendered' when the video stream is invalid?
[20:08:33 CEST] <derpderpuz> sorry I don't understand the question
[20:09:07 CEST] <sfan5> if you fuzz the encoded video and make it invalid by doing that
[20:09:14 CEST] <sfan5> how do you know whether it is correctly rendered?
[20:09:20 CEST] <derpderpuz> hah sort of a noob to fuzzing. trying to learn and contribute to an open source project
[20:09:36 CEST] <derpderpuz> i don't know if it is rendered correctly
[20:09:43 CEST] <c_14> derpderpuz: that should work
[20:09:49 CEST] <c_14> That command.
[20:09:51 CEST] <sfan5> how do you want to find rendering bugs then?
[20:09:55 CEST] <c_14> Can you pastebin console output?
[20:10:02 CEST] <derpderpuz> but the assumption would be that the original video renders properly
[20:10:08 CEST] <derpderpuz> the fuzzed video renders differently
[20:10:37 CEST] <derpderpuz> to know that it is rendered "improperly" in this context would be to crash VLC or cause the video to end prematurely
[20:10:52 CEST] <derpderpuz> c_14 one moment yes
[20:10:59 CEST] <sfan5> if it crashes vlc you might find vlc bugs instead of ffmpeg bugs
[20:11:17 CEST] <sfan5> so you might want to use ffplay
[20:11:53 CEST] <derpderpuz> well most of the stuff I'm targeting are going to be formats which are libraries used by both ffmpeg and vlc
[20:12:51 CEST] <derpderpuz> so what I'd be hoping for is that I can find a bug in the way that vlc is parsing the library (which could be similar in ffmpeg) but really more or less the reason I came to consult with you guys
[20:13:07 CEST] <derpderpuz> was the splitting of the videos and proper altering of the bitrate
[20:13:18 CEST] <derpderpuz> vlc sucks for that stuff
[20:13:24 CEST] <derpderpuz> and brb c_14
[20:13:38 CEST] <sfan5> i think vlc is not meant to be a proper video converter
[20:13:48 CEST] <derpderpuz> no its not really lol
[20:13:59 CEST] <derpderpuz> and I've got plenty of gui ones taht would seem to wkr
[20:14:13 CEST] <derpderpuz> but theyre jsut a bitch to use and i have a jillion files
[20:14:26 CEST] <derpderpuz> the only one would be the mkv which would be a sinch with the MkvToolnix
[20:14:39 CEST] <derpderpuz> but I figured you guys may have a creative solution as far the splitting goes
[20:14:49 CEST] <derpderpuz> for me the 'trim" function doesn't seem to work at all
[20:15:08 CEST] <derpderpuz> but someone told me there were some decent python libraries/wrappers for ffmpeg
[20:15:59 CEST] <sfan5> i would just get the duration and have a counter incremented by 10 each step and then run ffmpeg -ss <counter> -i video.avi -t 10 out.mkv
[20:17:59 CEST] <derpderpuz> http://pastebin.com/Nqy1pGiL
[20:19:14 CEST] <c_14> derpderpuz: you're using libav, not ffmpeg
[20:19:20 CEST] <c_14> Can you retry with the static build?
[20:19:22 CEST] <c_14> http://johnvansickle.com/ffmpeg/
[20:19:50 CEST] <derpderpuz> thank you
[20:19:52 CEST] <derpderpuz> i'll do this
[20:19:58 CEST] <derpderpuz> um how do I do this by the way lol
[20:20:04 CEST] <derpderpuz> I can't apt-get?
[20:20:37 CEST] <c_14> Go to that page, and just wget the bz2, then extract it.
[20:20:56 CEST] <derpderpuz> Lol the fact i'm using libav makes sense
[20:20:57 CEST] <derpderpuz> now
[20:21:09 CEST] <derpderpuz> when I run "ffmpeg anyvideo.mp4" fuckig VLC pops up
[20:21:12 CEST] <derpderpuz> same with ffplay
[20:21:18 CEST] <derpderpuz> and alright
[20:21:19 CEST] <derpderpuz> doin that now
[20:22:31 CEST] <derpderpuz> only available builds show to be in tar.xz
[20:22:38 CEST] <derpderpuz> that the same file you're talking about?
[20:22:59 CEST] <c_14> ye
[20:23:35 CEST] <derpderpuz> oooh
[20:23:40 CEST] <derpderpuz> i like how the xz disappears
[20:23:43 CEST] <derpderpuz> fuck gz
[20:24:15 CEST] <c_14> tar xJvf ffmpeg.tar.xz
[20:24:26 CEST] <derpderpuz> oh i just xz -d
[20:24:32 CEST] <derpderpuz> thanks 4 dat
[20:25:03 CEST] <relaxed> tar xvf should do it too
[20:25:34 CEST] <derpderpuz> from here I can just run any of the ffmeg ELFs
[20:25:38 CEST] <derpderpuz> ?
[20:25:48 CEST] <relaxed> yes
[20:26:20 CEST] <derpderpuz> oh i think i just learned what a static build is now lol
[20:26:25 CEST] <derpderpuz> awsome
[20:28:23 CEST] <derpderpuz> ok so can i just put the ffmpeg elf into my PATH env var?
[20:28:27 CEST] <derpderpuz> so i can just run it
[20:29:13 CEST] <c_14> yes
[20:29:22 CEST] <c_14> as long as it's before your system ffmpeg in your PATH
[20:32:18 CEST] <derpderpuz> stupid fuckin thing
[20:34:04 CEST] <derpderpuz> okay so maybe I should rephrase my question
[20:35:27 CEST] <derpderpuz> context: I'd like to have the bitrate as high as humanly possible during fuzzing, because often the fuzzer or fuzzer manager will kill the video only a few seconds in to being played, so I'd like to have it hit as much of the video possible , that's why I'm increasing the bitrate
[20:35:58 CEST] <derpderpuz> question: is there any way I can just set the bitrate to some SUPER high range that no video is set to normally?
[20:36:15 CEST] <derpderpuz> for me the bitrate doesn't seem to change at all when I check my output file with -i
[20:36:51 CEST] <derpderpuz> also, c_14 and relaxed and others, you're all great. thank you :)
[20:40:08 CEST] <c_14> If you're using x264, just set crf=1 ?
[20:41:25 CEST] <derpderpuz> well i'm not using any codecs imparticular
[20:41:35 CEST] <derpderpuz> i'm actually using like thousands and thousands of various files
[20:41:38 CEST] <derpderpuz> and various formats
[20:42:08 CEST] <derpderpuz> the goal is to have all of them converted into a set few formats (mkv / mxf / a few others) with really high bitrates
[20:42:50 CEST] <derpderpuz> and have each of these split up into 10 second segments
[20:43:58 CEST] <c_14> You can try setting the bitrate to some really high number, but the encoder might not use all of it.
[20:44:38 CEST] <derpderpuz> might not use all of it?
[20:45:03 CEST] <derpderpuz> like the bitrate will be too high for it to be rendered by the encoding
[20:45:05 CEST] <c_14> If the encoder decides it doesn't need that much bitrate for the video, it won't use it.
[20:45:11 CEST] <derpderpuz> hmm
[20:45:11 CEST] <derpderpuz> okay
[20:45:20 CEST] <c_14> Though you might be able to force cbr with minrate and maxrate
[20:45:50 CEST] <derpderpuz> will the -c copy maintain the streams encoding of the streams even if I have one file converted to another
[20:50:44 CEST] <c_14> As long as you're only changing formats and the stream is compatible with that format, yes.
[20:51:45 CEST] <derpderpuz> okay badass
[20:51:55 CEST] <derpderpuz> will you be around for the next 10 mins?
[20:52:00 CEST] <derpderpuz> going to try and implement your coutner thing
[20:52:15 CEST] <c_14> sure
[21:05:18 CEST] <derpderpuz> damn have to go to meeting
[21:05:18 CEST] <derpderpuz> brb
[21:05:22 CEST] <derpderpuz> like 30 mins
[21:10:37 CEST] <Svenska> hi. i've got a general question about MPEG4... if I wanted to write a decoder, how much memory do I minimally need to decode frames of e.g. 172x144 resolution?
[21:11:29 CEST] <Svenska> the background is that I have access to a 32-bit embedded system with ~512 KB of high-speed memory (and some more which is incredibly slow), but high processing throughput
[21:11:42 CEST] <Svenska> so the question is: how much state do i need to keep?
[21:12:27 CEST] <Svenska> (the device in question is more like an accelerator chip next to a dual-core arm linux system)
[21:12:40 CEST] <pzich> are you storing the frame output in that high speed memory too? 172x144x4 bytes is already 97K
[21:12:50 CEST] <Svenska> no
[21:13:20 CEST] <Svenska> it is a 16-core device with 32 KB of memory per core (total 512 KB, minus code size)
[21:13:42 CEST] <Svenska> the idea is to stream mpeg data in, and stream yuv or rgb data out
[21:47:46 CEST] <Svenska> pzich: any idea?
[21:48:58 CEST] <pzich> Svenska: unfortunately not, don't have much experience with writing my own decoder or embedded system optimizations
[21:49:55 CEST] <Svenska> anyone else who can give me some background on mpeg4 decoders?
[22:16:28 CEST] <derpderpuz> c_14 you there?
[22:37:19 CEST] <podman> is there a way to have ffmpeg output something if -ss is fast the duration of the input file when creating an image? like the last frame of the video or something?
[22:38:37 CEST] <derpderpuz> can you rephrase?
[22:43:35 CEST] <Mavrik-> Svenska, which of the MPEG-4 video formats are you interested in/
[22:43:37 CEST] <Mavrik-> ?
[22:44:22 CEST] <Svenska> Mavrik: probably just some basic profile
[22:44:52 CEST] <Svenska> simple profile
[22:47:39 CEST] <Mavrik> That should certanly be doable with 512K of RAM (after all, devices playing that had significantly less) but I need to look at the standard
[22:51:39 CEST] <Mavrik> Yeah, Simple profile limits VBV buffer to 16K + whatever frame you're currently decoding (+ I-frame)
[22:52:05 CEST] <Mavrik> so you could probably get away with storing 2-3 frames if you need them
[22:53:38 CEST] <Svenska> so two frames plus 16K
[22:55:19 CEST] <Svenska> our problem is that we do have a (not our own...) SP decoder, which uses >20 MB of external memory, accessing it all over the place and limiting the speed to ~5 fps
[22:55:52 CEST] <Svenska> on a highly parallel system; it is definitely better to implement our own decoder then, but i wanted to know if it is feasible to do so
[22:56:26 CEST] <Mavrik> Mhm, I'm just not sure just how much cross-talk are you going to have if you have 32K per thread
[22:56:42 CEST] <Mavrik> Is your system sensitive to threads accessing other threads memory?
[22:56:54 CEST] <Svenska> well, communication speed between the core-local memories is fast enough
[22:57:24 CEST] <Svenska> some GB/s, so no big deal. external memory (32 MB in size) is limited to ~75 MB/s with high latency
[22:57:25 CEST] <Mavrik> even though, MPEG4-SP has tiny blocks
[22:58:06 CEST] <Svenska> do blocks depend on each other, or is it possible to parallelize them?
[22:59:06 CEST] <Mavrik> Depends on motion vectors
[22:59:08 CEST] <Svenska> our goal would be to implement a decoder in a dataflow fashion, streaming the data through the chip
[22:59:10 CEST] <Mavrik> But yeah, it can happen for you
[22:59:13 CEST] <Mavrik> http://www.diva-portal.org/smash/get/diva2:402602/FULLTEXT01.pdf
[22:59:28 CEST] <Svenska> LOL
[22:59:31 CEST] <Mavrik> I guess some guys already worked at that :P
[22:59:35 CEST] <Svenska> that guy is my collegue :D
[23:00:11 CEST] <Mavrik> :D
[23:00:31 CEST] <Svenska> he says hi :D
[23:00:54 CEST] <Mavrik> Anyway, I'd have to re-read the ISO document for concrete answers :/
[23:01:18 CEST] <Mavrik> And it's a 500 page muck with everything scattered around, so can't really answer all of those out of my head.
[23:01:48 CEST] <Svenska> is it available somewhere, or some other good documentation on mpeg4 ?
[23:01:50 CEST] <Mavrik> But the decoder requirements are in there somewhere :(
[23:02:17 CEST] <Mavrik> That's the definition: http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=39259
[23:03:20 CEST] <Svenska> mh, so costs big money :(
[23:03:59 CEST] <Mavrik> Just google the number :)
[23:04:47 CEST] <Svenska> you win :)
[23:06:26 CEST] <Svenska> but if it is possible to get by with relatively little memory (and relatively few accesses to external memory), then it's worth going there
[23:07:31 CEST] <Svenska> do you know how it compares to larger profiles of mpeg4, like HD or so?
[23:11:00 CEST] <Mavrik> Hmm, there's a table in appendix N
[23:11:04 CEST] <Mavrik> it's not the resolution it kills you
[23:11:13 CEST] <Mavrik> it's how many frames for lookahead / lookback you need to keep
[23:11:30 CEST] <Mavrik> H.264 (MPEG-4 AVC) for example has Baseline profile which has those severely limited and it's meant for low mem devices
[23:12:00 CEST] <Mavrik> Do you have framebuffer inside those 512K?
[23:12:05 CEST] <Svenska> no
[23:12:45 CEST] <Svenska> this chip is "just" an accelerator to the linux system
[23:13:17 CEST] <Svenska> it shares 32 MB of memory with the arm cores, and contains 16 cores (each with 32 KB of local memory) and a high-speed network
[23:14:06 CEST] <Svenska> the main concern is how much "state" i need to keep inside the decoder, and how often this state needs to be accessed
[23:16:12 CEST] <Svenska> swapping it out severely hurts performance, but that's acceptable - hopefully we can quadruple performance soon(ish), when the interface gets updated
[23:17:55 CEST] <Svenska> not enough to do fullHD, but maybe PAL resolution
[23:18:40 CEST] <Svenska> what does VCV and VBV stand for?
[00:00:00 CEST] --- Fri Jul 17 2015

More information about the Ffmpeg-devel-irc mailing list