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

burek burek021 at gmail.com
Sun May 29 02:05:01 CEST 2016


[00:00:37 CEST] <allquixotic_> rkern: Looks like you are the developer of the videotoolbox h264 encoder? :) -- Would you perhaps know what option I can pass to the ffmpeg command to set the quality factor?
[00:01:34 CEST] <allquixotic_> Or are there presets? Or any other kind of mechanism for controlling the tradeoff between file size and quality that isn't constant bitrate?
[00:02:07 CEST] <rkern> It doesn't support a quality factor, just (average) bit rate.
[00:03:19 CEST] <allquixotic_> OK, and that will be driven by QSV under the hood on supported hardware?
[00:06:11 CEST] <rkern> I assume so - Videotoolbox abstracts that away. iOS for example uses different hardware.
[00:07:21 CEST] <allquixotic_> Hmm. In your work on VideoToolbox, have you found any sort of "codec query" mechanism to retrieve the available codecs and which ones may be default or so?
[00:07:44 CEST] <allquixotic_> (Independent of ffmpeg, that is, just some kind of system utility or even a compilable program)
[00:08:36 CEST] <vade> heres a dumb question - I need to calculate the duration of a synthesized video frame to ensure I hit a constant frame rate for generated packets. I thought I had it right, but i have a file where my r_framerate is 2997/125 (23.976), and my destination time base for the codec is 5994. How do I discern a correct frame duration in codec time base ? I tried av_rescale_q(1, , r_frame_rate, codec->time_base), but it seems way off
[00:09:59 CEST] <rkern> allquixotic_: You can use VTCopyVideoEncoderList() to query the encoders.
[00:10:47 CEST] <allquixotic_> Thanks!
[00:16:23 CEST] <rkern> vade: the second parameter should be 1/r_frame_rate or 125/2997
[00:16:43 CEST] <vade> ah!
[00:20:32 CEST] <vade> thanks, that looks like it was it. Derp.
[00:23:48 CEST] <llogan> wallbroken: -c copy -metadata:s:v:0 rotate="90"
[00:31:08 CEST] <BobDole> I have an mp4 file (video + audio) and an mp3 file (audio).  I want to create an mp4 file that has video + 2 audio tracks (add the mp3 file as an audio track and make it the default).  I am doing "ffmpeg -i .\v.mp4 -i .\a.mp3 -map 0:v -map 0:a -map 1:a -codec copy -shortest output.mp4", but it keeps setting the mp4's audio track as the default audio track regardless of the order I do it in.
[00:31:08 CEST] <BobDole> How do I make the mp3 be the default audio track?
[00:39:12 CEST] <rkern> allquixotic_: I had some code lying around that pulls the encoder info. It's pushed to https://github.com/badfroggy/VTEncInfo.
[00:40:49 CEST] <llogan> BobDole: maybe the -disposition option has something to do with that
[03:44:30 CEST] <drazin> can anyone help me apply a patch to ffmpeg on windows
[03:47:20 CEST] <drazin> https://gist.github.com/outlyer/4a88f1adb7f895b93fd9
[03:58:17 CEST] <drazin> trying to apply this
[04:01:46 CEST] <furq> drazin: there is a way to set the default track, it's just not documented yet
[04:01:55 CEST] <furq> -disposition:s:0 default -disposition:s:1 0
[04:02:03 CEST] <furq> er
[04:02:07 CEST] <furq> -disposition:a:0 default -disposition:a:1 0
[04:02:59 CEST] <furq> http://vpaste.net/68lBt
[04:03:20 CEST] <furq> that's from doing the reverse of that, obviously
[04:03:26 CEST] <drazin> https://github.com/mdhiggins/sickbeard_mp4_automator/issues/486
[04:03:50 CEST] <drazin> looks like this guy thought of that
[04:04:19 CEST] <furq> that reply isn't very informative
[04:04:22 CEST] <drazin> but the dev shot it down as an mmpeg error
[04:04:23 CEST] <drazin> yeah
[04:04:37 CEST] <drazin> i'll try his patched files
[04:04:40 CEST] <furq> if nothing else ffprobe shows one track marked as default
[04:04:47 CEST] <furq> have you tested -disposition on iOS
[04:05:03 CEST] <drazin> nope
[04:05:12 CEST] <drazin> cuz i dont know how to do anything other than use this script
[04:06:43 CEST] <furq> yeah that bug report says that -disposition works
[04:06:49 CEST] <furq> and then the reply just shoots it down with no explanation
[04:08:33 CEST] <drazin> hmmm so in the directory with the avcodecs theres a avcodecs.py and avcodecs.pyc which means one is compiled
[04:08:40 CEST] <drazin> which do i apply the update to?
[04:09:19 CEST] <furq> probably the one which isn't compiled
[04:09:42 CEST] <drazin> do i delete or do anything to the compiled
[04:09:49 CEST] <drazin> maybe force it to recompile
[04:10:06 CEST] <furq> i believe it'll do it when you run the script
[04:10:11 CEST] <furq> i try my best to avoid python though
[04:11:16 CEST] <drazin> i renamed them to .old and ran script
[04:11:18 CEST] <drazin> it made new ones
[04:11:20 CEST] <drazin> testing now
[04:58:04 CEST] <drazin> Damn. furq didn't work
[04:58:20 CEST] <drazin> Still echo on iOS
[06:24:27 CEST] <galex-713> is it possible to ask ffmpeg to do conversion block by block from the end of a video?
[07:03:57 CEST] <AndrewMock> Is there a way to measure something like SNR between out.mp3 and in.wav?
[07:04:04 CEST] <AndrewMock> can't find one
[07:15:36 CEST] <AndrewMock> oh well
[07:15:48 CEST] <AndrewMock> i will work on PSNR in matlab
[07:16:01 CEST] <AndrewMock> until then i will invert one and play both to hear differences
[09:56:41 CEST] <Kudas> Hello. Guys i need an help with an encrypted m3u8:
[09:56:43 CEST] <Kudas> #EXT-X-KEY:METHOD=AES-128,URI="00001.key",IV=0x1899baa9b6f9a3a4647f2adbc1ac3ce0
[09:57:07 CEST] <Kudas> I have the 00001.key in the same path of the m3u8 but what about the IV?
[10:01:03 CEST] <Kudas> If i try i have this error --> Protocol not on whitelist 'file,crypto'!
[11:43:38 CEST] <wallbroken> unfortunately ffmpeg remove most of the original metadata
[11:44:07 CEST] <wallbroken> for example romoves "iphone 6" as the device camera
[14:18:57 CEST] <lilibox> hi, dunno if this is question to this room, i would like to make ffmpeg static from source, what is official page describes how to set environment to do it?
[14:26:12 CEST] <DeHackEd> a static link of libav* is the default. for a full static link you have some prereqs to meet
[14:52:05 CEST] <Fouad> hi all
[14:52:09 CEST] <Fouad> how are you
[14:52:27 CEST] <Fouad> i want to donwnload video from youtube with ffmpeg
[14:52:34 CEST] <Fouad> is it possible ?
[14:53:12 CEST] <c_14> If you have something that will parse the url for you, sure.
[14:53:16 CEST] <c_14> But honestly, just use youtube-dl
[14:58:39 CEST] <Fouad> thenk you c14
[14:58:49 CEST] <Fouad> can you show me how can i proceed
[14:58:56 CEST] <Fouad> to download video
[15:00:01 CEST] <JEEB> Fouad: just use youtube-dl, it makes no sense for you to try to duplicate what that project is doing
[15:00:07 CEST] <c_14> If you just want to download the video, just call youtube-dl <url>; if you want to directly pass it to ffmpeg, call youtube-dl -g <url> and then ffmpeg -i <output of youtube-dl>
[15:00:37 CEST] <Fouad> i use vb.net
[15:00:51 CEST] <Fouad> for that
[15:01:06 CEST] <Fouad> i want to integrate it into my application
[15:01:26 CEST] <Fouad> youtube-dl is parte of ffmpeg or auther tool
[15:01:48 CEST] <c_14> https://rg3.github.io/youtube-dl/
[15:02:23 CEST] <DeHackEd> heck, youtube-dl uses the ffmpeg cli tool when it needs it
[15:04:52 CEST] <Fouad> thank you
[15:08:32 CEST] <nifwji2> I have a problem.
[15:08:56 CEST] <nifwji2> I am trying to encode 180 images into a 6 second video.
[15:09:43 CEST] <nifwji2> but everytime I run the command it gets to frame 12 before it starts freezing my computer.
[15:09:49 CEST] <nifwji2> I was forced to restart earlier.
[15:09:55 CEST] <nifwji2> ffmpeg -r 30 -f image2 -s 5153x4113 -i %d.png -c:v libx265 -preset ultrafast -x265-params lossless=1 OUTPUT.mkv
[15:10:01 CEST] <nifwji2> this is the command I am using.
[15:10:37 CEST] <c_14> you shouldn't need that -s and you should probably use -framerate instead of -r
[15:10:41 CEST] <c_14> how much RAM does your system have?
[15:10:47 CEST] <c_14> And does it have swap?
[15:11:07 CEST] <nifwji2> my system has 4gb of ram.
[15:11:13 CEST] <nifwji2> and I don't know what swap is.
[15:11:39 CEST] <c_14> check the output of free -m
[15:11:45 CEST] <c_14> the second line
[15:12:47 CEST] <nifwji2> ssecond line?
[15:13:27 CEST] <c_14> third line, the one that says Swap:
[15:13:28 CEST] <nifwji2> also the video is green when I play it back.
[15:14:13 CEST] <nifwji2> I am so confused.
[15:14:20 CEST] <nifwji2> what lines?
[15:14:57 CEST] <c_14> If you run `free -m' the output should look something like this https://pb.c-14.de/t/kng.VqkOF2
[15:16:31 CEST] <nifwji2> free isn't a recognised command.
[15:16:46 CEST] <c_14> Are you on windows?
[15:16:49 CEST] <nifwji2> and it doesn't work when I use it as an argument with ffmpeg.
[15:16:51 CEST] <nifwji2> I use windows.
[15:16:54 CEST] <c_14> ah
[15:17:18 CEST] <nifwji2> windows 10 is supposed to be "lightweight"
[15:17:20 CEST] <c_14> Windows does have a pagefile, but I'm not sure how that works.
[15:17:24 CEST] <nifwji2> but it uses like 2gb of ram.
[15:18:05 CEST] <c_14> Anyways, what I'm assuming is happening is that ffmpeg uses up all the RAM on your computer and then your computer starts swapping to disk and everything slows to hell because your hard disk is much slower than your ram
[15:18:18 CEST] <furq> nifwji2: wmic pagefile list /format:list
[15:18:33 CEST] <furq> AllocatedBaseSize is your total swap space
[15:18:39 CEST] <c_14> encoding images at that resolution is not easy on your ram
[15:18:48 CEST] <nifwji2> I have 180 images that are 1.5mb each
[15:18:59 CEST] <nifwji2> I got them from a flash game.
[15:19:09 CEST] <nifwji2> it is a mini cutscene
[15:19:29 CEST] <nifwji2> my computer is just not cut out for this level of encoding.
[15:19:36 CEST] <c_14> you're either going to need more ram or smaller images
[15:19:36 CEST] <furq> they'll be much bigger than that decompressed though
[15:20:05 CEST] <nifwji2> my media player is using 800mb of ram right now
[15:20:11 CEST] <furq> that's about 11GB uncompressed for 180 images
[15:20:18 CEST] <nifwji2> I tried opening the tiny video file with only 20 frames in it.
[15:20:25 CEST] <furq> plus x265 on top of that
[15:21:23 CEST] <nifwji2> the crazy thing.
[15:21:33 CEST] <nifwji2> I was planning on encoding all the games cutscenes.
[15:21:43 CEST] <furq> also i'm pretty sure that command won't be lossless because it'll convert from rgb to yuv
[15:21:57 CEST] <nifwji2> it's cutscense require you to click through them.
[15:22:09 CEST] <furq> you might have better luck using a different codec
[15:22:10 CEST] <nifwji2> so I would need to extract about 15000 frames
[15:22:17 CEST] <furq> or just downscaling the images
[15:22:48 CEST] <nifwji2> then edit it to make it pause at  certain points.
[15:23:04 CEST] <nifwji2> then edit together all of the audio manually.
[15:23:13 CEST] <nifwji2> and then combine the files together.
[15:23:26 CEST] <nifwji2> then I will have a super high quality cutscene.
[15:24:05 CEST] <nifwji2> assuming my computer could handle it.
[15:24:09 CEST] <furq> you could just use apng/mng
[15:24:23 CEST] <nifwji2> what would a good command be to losslessly encode it.
[15:24:25 CEST] <furq> it sounds like png is already doing a pretty good job of compressing those images
[15:25:23 CEST] <nifwji2> it took me 1 hour and 11 minutes to export all 180 frames of the animation.
[15:25:33 CEST] <furq> actually nvm if you want the audio then apng is no good
[15:25:46 CEST] <nifwji2> so imagine how long it would take for like 8 minutes of video.
[15:29:57 CEST] <nifwji2> vector graphics is really cool.
[15:30:04 CEST] <nifwji2> why isn't it more commonly used?
[15:57:16 CEST] <nifwji2> I have another problem.
[15:57:34 CEST] <nifwji2> apart from not being able to export the audio correctly.
[15:57:50 CEST] <nifwji2> the frames aren't perfect rectangles.
[15:58:00 CEST] <nifwji2> they have a bunch of junk outside the edges.
[15:58:18 CEST] <nifwji2> this is how most cutscenes work in flash.
[15:58:35 CEST] <nifwji2> but normally you don't see all the junk outside the edges.
[16:07:43 CEST] <k0ral> Hello
[16:09:36 CEST] <k0ral> I have 3 audio files (.ogg) that I'd like to mix into one; they're exactly the same length, I tried `ffmpeg -i file1.ogg -i file2.ogg -i file3.ogg -filter_complex amix=inputs=3 -c:a libvorbis -q:a 6 output.ogg`, but there's something that bothers me:
[16:10:05 CEST] <k0ral> each of the input file is encoded in a bitrate 501 Kbps
[16:10:40 CEST] <k0ral> now I observe that depending on the `-q:a N` I choose, the bitrate of the mixed audio file changes
[16:11:18 CEST] <k0ral> would it be possible to tell ffmpeg that I'd like to keep the same bitrate ?
[16:12:53 CEST] <DeHackEd> you should switch to using "-b:a 501k" then instead of -q:a
[16:15:18 CEST] <__jack__> k0ral: -q:a means "keep a constant quality", that's a good idea
[16:15:38 CEST] <__jack__> bitrate is useless, unless you are targeting a specific player with specific bitrate limitation
[16:16:25 CEST] <DeHackEd> and 500 kilobit is actually pretty high for what vorbis can do, unless you're dealing with 5.1 surround sound or something to that effect
[16:20:38 CEST] <k0ral> I just don't want to lose information
[16:21:36 CEST] <k0ral> besides, bitrate is variable, 501k is the average I guess (as reported by mediainfo)
[16:22:26 CEST] <k0ral> so `-b:a 501k` might lose some info
[16:25:49 CEST] <DeHackEd> if that's the case, then the source material was probably encoded with -q mode
[16:26:37 CEST] <k0ral> so there's no such thing as "keep all the input information" ?
[16:30:47 CEST] <__jack__> k0ral: lossless encode, maybe
[16:30:58 CEST] <__jack__> you'll have a much bigger bitrate
[16:31:50 CEST] <__jack__> dunno if it can be done with vorbis, seems not
[16:32:03 CEST] <k0ral> looks pretty overkill
[16:32:22 CEST] <__jack__> indeed
[16:35:47 CEST] <DeHackEd> even if you could, each of the 3 files would have independent moment-by-moment bitrates. which do you choose?
[16:36:11 CEST] <furq> yeah if you're mixing them into one stereo track then it doesn't really make sense anyway
[16:36:35 CEST] <furq> if you were using amerge then it would make sense, although i don't think there's a way to do that with libavfilter
[16:37:59 CEST] <nifwji2> I tried making an animated png file.
[16:38:05 CEST] <nifwji2> the application crashed.
[16:38:10 CEST] <nifwji2> immediately.
[16:38:42 CEST] <k0ral> DeHackEd: the highest at each moment
[16:39:02 CEST] <k0ral> I guess I'm mistakenly imagining this process as a linear transformation, which it is probably not
[16:39:29 CEST] <DeHackEd> no, it's "decode each, apply filter to raw samples, re-encode"
[16:41:01 CEST] <k0ral> ok, I'll settle with q:a 6, thanks for the help
[16:51:01 CEST] <nifwji2> I tried using handbreak to rip a dvd.
[16:51:38 CEST] <nifwji2> and the resulting file wasn't even recognizable.
[17:02:29 CEST] <nifwji2> my computer can only handly about 10 frames before the encode breaks.
[17:02:54 CEST] <nifwji2> so maybe I could encode the video into 18 seperate video files.
[17:03:14 CEST] <nifwji2> then put the video files together into one.
[17:47:06 CEST] <PlanC> is it worth going through the trouble to upgrade ffmpeg?
[17:47:14 CEST] <PlanC> I'm on 2.6 atm
[17:49:40 CEST] <BtbN> Do you need/want any of the improvements and fixes since 2.6?
[17:49:48 CEST] <JEEB> I remember a very little amount of stuff that has been fixed lately, but stuff like blu-ray subtitle rendering, largely reworked AAC encoder (no longer bad), etc
[17:50:25 CEST] <JEEB> since you can just build a basic ffmpeg into a user directory and test your use cases I think generally the decision of updating or not should be simple enough :P
[17:50:59 CEST] <JEEB> of course if you just don't want to update then this discussion is completely meaningless
[17:51:18 CEST] <PlanC> I mostly just strip the audio from my lecture videos into mp3 files
[17:51:28 CEST] <wallbroken> unfortunately ffmpeg remove most of the original metadata
[17:51:29 CEST] <wallbroken> for example romoves "iphone 6" as the device camera
[17:51:40 CEST] <PlanC> it takes a while to do on my laptop so I thought that maybe the new update would speed the process up
[17:51:54 CEST] <JEEB> if it's just -c copy then it should be pretty fast in any case
[17:52:01 CEST] <JEEB> unless you're really IO limited
[17:54:34 CEST] <PlanC> I used to do that but the files become huge
[17:54:45 CEST] <PlanC> I save some space by encoding in mp3
[17:55:12 CEST] <JEEB> so your input audio is something like raw PCM?
[17:55:51 CEST] <PlanC> it's videos that are filmed on an iphone
[17:56:02 CEST] <PlanC> I transfer the videos to my pc
[17:56:13 CEST] <PlanC> encode them to mp3
[17:56:21 CEST] <JEEB> post a full ffprobe output of one of them in a pastebin
[17:56:28 CEST] <JEEB> and linke here
[17:57:14 CEST] <PlanC> will do it later if I remember
[17:57:16 CEST] <PlanC> on desktop atm
[17:57:52 CEST] <JEEB> basically wanted to make sure if the stuff really has raw audio. if not you should be able to just -vn -c:a copy it into, say, mp4 or m4a with just the compressed audio
[18:09:06 CEST] <furq> wallbroken: https://ffmpeg.org/ffmpeg.html#Advanced-options
[18:09:08 CEST] <furq> see -map_metadata
[18:10:12 CEST] <wallbroken> is not clear
[18:10:15 CEST] <furq> PlanC: http://johnvansickle.com/ffmpeg/
[18:10:32 CEST] <wallbroken> i want to keep all untuched and only modify rotation tag
[18:10:44 CEST] <wallbroken> all the ather must keep untouched
[18:10:53 CEST] <furq> -map_metadata 0
[18:11:02 CEST] <furq> then set the rotation tag after that
[18:12:10 CEST] <wallbroken> ok let me try
[18:12:24 CEST] <Admin__> hey guys.. this is an annoying little thing... i am outputting http to webdav which is working well with PUT .. but the delete does not work.. anyone knwo why ? do i have to do something like "PUT,DELETE" or something like that ?
[18:13:52 CEST] <wallbroken> furq: ffmpeg.exe -i input.mov -c copy -map_metadata 0 -metadata:s:v:0 rotate="90" output.mov
[18:13:54 CEST] <wallbroken> that's good?
[18:14:06 CEST] <furq> sure
[18:15:27 CEST] <Admin__> hey.. will that give me my closed caption data out into -map ?? its embeded in video right now.. .i am using ffmpeg -copy > |hardware transcoder | ffmpeg seggent.. the hardware transcoder is loosing the closed caption.. am i able to map the data out with -map ??? maybe not right since its in video and i would have to decode first
[18:15:41 CEST] <Admin__> just asking because i did not see that before
[18:16:28 CEST] <wallbroken> no
[18:16:31 CEST] <wallbroken> that's not work
[18:16:38 CEST] <wallbroken> it deletes as the same
[18:16:51 CEST] <wallbroken> com.apple.quicktime.make                 : Apple
[18:16:51 CEST] <wallbroken> com.apple.quicktime.model                : iPhone 4S
[18:16:51 CEST] <wallbroken> com.apple.quicktime.software             : 9.3.2
[18:16:52 CEST] <wallbroken> removed
[18:17:41 CEST] <JEEB> probably it doesn't even read that apple-specific metadata and thus doesn't pass it through
[18:18:01 CEST] <JEEB> I have no idea why you would care about that metadata, but if you do feel free to create an issue on the tracker
[18:18:13 CEST] <JEEB> preferably with a small sample file
[18:18:26 CEST] <wallbroken> because i don't like that a software change things that i haven't told it to do
[18:18:59 CEST] <Admin__> hey guys... does FFMPEG require some library installed for closed caption data ?? it was working then it all of a sudden stopped.. i am wonder if someone uninstalled some libary on the system which is preventing ffmpeg from copying the data to the output
[18:19:11 CEST] <wallbroken> for example when i change rotation tag in jpeg photos, it changes only 1 byte rapresenting the number of the orientation
[18:19:26 CEST] <wallbroken> no other thing has been changed
[18:19:47 CEST] <JEEB> well ffmpeg cli by definition goes through a full demux-[whatver]-mux cycle
[18:19:54 CEST] <JEEB> so if that metadata is not generic
[18:20:00 CEST] <JEEB> and requires a demuxer implementation
[18:20:04 CEST] <JEEB> as well as a muxer one
[18:20:25 CEST] <JEEB> and if you care as much you should look at the damn difference of the files in L-SMASH's boxdumper
[18:20:34 CEST] <JEEB> ffmpeg is not the tool for you if you want to do minimal changes
[18:20:43 CEST] <wallbroken> ok, so, i need to write my own C software than finds rotation byte into the binary stream and then change it
[18:21:31 CEST] <JEEB> or use something more specific to your container, yes. something that is designed to replicate that one container 1-to-1 in its data structures
[18:21:56 CEST] <wallbroken> i don't think it exists
[18:22:53 CEST] <JEEB> plus as I said, with something like ISOBMFF/mov/matroska you can add add random blocks and a demuxer should just ignore them if it doesn't know what to do with such
[18:23:13 CEST] <JEEB> so whatever you would be using would have to just take that bunch of bytes in and barf it out as-is
[18:24:14 CEST] <JEEB> you can use L-SMASH's boxdumper to find out the byte position of the block containing the rotation metadata
[18:24:31 CEST] <JEEB> and then if you know how that block looks like byte-wise you can modify it in a copy
[18:24:43 CEST] <JEEB> and then look at the resulting file once again in boxdumper
[18:37:08 CEST] <Fyr> guys, when doing concatenation of three files I found out that ffmpeg instead of concatenating, removes from the first file its end of duration of the second file and adds the third file.
[18:37:14 CEST] <Fyr> why is it happening?
[18:38:41 CEST] <JEEB> welcome to the N different random hacks that enable you to do concatenation in ffmpeg cli
[18:38:55 CEST] <JEEB> (or even the API I guess since they are filters and demuxers and protocols)
[18:39:32 CEST] <nifwji2> the more I think about my project the harder it seems.
[18:39:37 CEST] <Fyr> why does it remove instead of doing concatenation?
[18:39:58 CEST] <nifwji2> I need to export 30000+ frames
[18:40:02 CEST] <nifwji2> at 4k
[18:40:13 CEST] <JEEB> first of all point out which type of concatenation you're using and then we someone can start entangling why it's not working for you
[18:40:35 CEST] <JEEB> I think I've only used the concat filter so far and I was happy enough that it seemed to work in the use case I required
[18:41:08 CEST] <Fyr> command: ffmpeg -f concat -i list.txt -c copy result.mkv
[18:41:08 CEST] <Fyr> list.txt:
[18:41:08 CEST] <Fyr> file '1.mkv'
[18:41:08 CEST] <Fyr> file '2.mkv'
[18:41:08 CEST] <Fyr> file '3.mkv'
[18:41:28 CEST] <Fyr> those mkv files do not contain video stream, only audio ac-3.
[18:42:01 CEST] <JEEB> yeh, concat demuxer. and you require copying of streams. thus only concat protocol or demuxer are usable, and both have clear issues some of which you have thus run into
[18:42:23 CEST] <Fyr> instead of "1|2|3"
[18:42:24 CEST] <Fyr> I get: "1-2|3"
[18:43:19 CEST] <JEEB> in the short term, use mkvtoolnix to get the job done. create an issue on the issue tracker and hope that someone just doesn't do another hack
[18:45:08 CEST] <JEEB> or actually since it's just AC3 you could just extract the tracks and concat them together and then remux into mkv
[18:48:38 CEST] <wallbroken> -map_metadata 0 saves few bytes intead of omitting it
[20:25:57 CEST] <drazin> when i try to run ffprobe.exe on a file i get permission denined
[20:25:59 CEST] <drazin> whats that about
[20:26:19 CEST] <c_14> the user running ffmpeg does not have read permissions on that file
[20:26:45 CEST] <c_14> and/or read/execute permissions on parts of the directory tree above that file
[20:29:04 CEST] <wallbroken> maybe it's an off topic question:
[20:29:14 CEST] <wallbroken> when i set a lower resolution on a phone camera
[20:29:17 CEST] <wallbroken> what happens?
[20:29:29 CEST] <wallbroken> some of pixel sensor are switched off?
[20:29:51 CEST] <wallbroken> or the video is captured at the maximum resolution and then is scaled by software?
[20:34:53 CEST] <Fyr> JEEB, is it possible that this is the problem of a (de)muxer?
[20:35:17 CEST] <Fyr> JEEB, long time ago I posted a bug concerning muxing abitlity of FFMPEG.
[20:35:18 CEST] <drazin> yeah im running as admin
[20:35:22 CEST] <drazin> i just copied the file locally
[20:35:26 CEST] <JEEB> possible, but more likely that it's the timestamp handling with going from one to another
[20:35:51 CEST] <Fyr> FFMPEG didn't work with offset properly.
[20:36:17 CEST] <Fyr> it's possible that it will work out with the other containers .
[20:36:46 CEST] <JEEB> yes, but generally that's an issue with the concat logic rather than demuxer logic
[20:36:58 CEST] <Fyr> generally?
[20:37:09 CEST] <Fyr> it means that this is usual. =)
[20:37:14 CEST] <JEEB> yes
[20:37:21 CEST] <Fyr> =(
[20:37:25 CEST] <JEEB> you can go scroll up to my first comment on concat features
[20:37:40 CEST] <JEEB> giant hacks made by someone that "works for me"
[20:38:35 CEST] <JEEB> so basically you can have "nice" issues with the handling of timestamps coming from the demuxer, plus other stuff
[20:38:56 CEST] <JEEB> I think I've mostly heard mpeg-ts working and awful stories of everything else
[20:39:07 CEST] <Fyr> ok, JEEB, if those timestamps are incorrect, what should I do to avoid them?
[20:39:26 CEST] <Fyr> how to stamp the right timestamps?
[20:39:36 CEST] <JEEB> you want to fix the concat shit? :P
[20:39:39 CEST] <JEEB> feel free
[20:40:15 CEST] <JEEB> basically you'd have to improve the timestamp logic that happens when moving from one thing to another, because currently it seems like nothing special is done
[20:40:40 CEST] <JEEB> and if your input demuxer isn't supposed to have random drops in timestamps, it will herp a derp and die in one way or another
[20:40:56 CEST] <JEEB> actual concatenation should keep the demuxer stuff separate per-thing
[20:41:01 CEST] <JEEB> unfortunately, that's not how it's done
[20:41:23 CEST] <JEEB> if you wouldn't be needing -c copy then you could have used the concat filter
[20:41:36 CEST] <JEEB> which seems to be the least insane (?) thing because it works outside the demuxer world
[20:41:41 CEST] <JEEB> and each thing is decoded separately
[20:41:58 CEST] <JEEB> so you don't have weird timestamp issues of going from o9k to zero suddenly during a single demux
[20:42:05 CEST] <JEEB> and yes it sucks
[20:42:34 CEST] <JEEB> but unfortunately most people only need limited solutions and FFmpeg never was really good at trying to force people to make generic solutions
[20:44:35 CEST] <Fyr> ok, JEEB, is it possible to create new correct timestamps by sending the audio into a pipe and receiving it && writing it into a container?
[20:46:02 CEST] <JEEB> I dunno, I would just use mkvtoolnix's tools for matroska specifically to stick things together. in general for AC3 you could just extract the track, concat it bytewise and stick it into a container again
[20:46:36 CEST] <Fyr> how to extract the audio?
[20:46:52 CEST] <JEEB> ffmpeg -i hurr.mkv -c copy out.ac3
[20:46:59 CEST] <Fyr> thanks
[20:47:13 CEST] <Fyr> it will find out -f option?
[20:57:02 CEST] <Admin__> *&%*W HELL !!!! ... so i am talking a live source from sat. and transcoding it.... every 26.5 hours my streams stop.. they are mpegts sources... anyone know a way around this problem ?
[20:57:09 CEST] <Admin__> nothing i do seems to help me
[20:57:16 CEST] <Admin__> only way is to auto restart every day at 4am
[20:57:26 CEST] <Admin__> what am i missing here
[21:56:47 CEST] <Admin__> anyone know how i can get around the 26.5 our pts wrap around issue ?
[22:06:02 CEST] <DHE> Admin__: I assume you meant "hour"
[22:06:33 CEST] <JEEB> in theory if it's the MPEG-TS timestamp thing
[22:06:39 CEST] <JEEB> the demuxer should be able to handle it
[22:06:46 CEST] <JEEB> if it doesn't you could call that a bug
[22:07:27 CEST] <JEEB> please start dumping the command line output (possibly with -v debug) and start poking at the relevant points of time so a report can be made
[22:07:48 CEST] <DHE> I'm actually trying to fix it myself. I dumped a ~28 hour stream
[22:08:12 CEST] <JEEB> I think one library has like three timestamps for MPEG-TS
[22:08:29 CEST] <JEEB> because depending on what exactly you're doing you want them handled a bit differently :D
[22:08:53 CEST] <JEEB> but yeah, the standard clock reset should be possible to handle, or at least should most definitely be handled correctly in the demuxer
[22:08:59 CEST] <DHE> yeah, sorta. mpeg-ts has a PCR (master clock, used for streaming), a PTS and DTS for each stream... and I'm not exactly sure how you actually use the PCR
[22:09:18 CEST] <JEEB> I think it was PCR and two versions of the PTS
[22:09:20 CEST] <DHE> but I'm getting definite errors in libavformat/utils.c after the 26.5 hour mark
[22:09:23 CEST] <JEEB> not sure though
[22:09:48 CEST] <DHE> frame=1881783 fps=1986 q=-1.0 size=61079755kB time=18:03:39.18 bitrate=7695.7kbits/s speed=68.6x
[22:09:51 CEST] <JEEB> also it would be interesting to see if it's in the demuxer or the muxer
[22:09:59 CEST] <JEEB> or something in between
[22:10:02 CEST] <DHE> it'd be faster but gdb is a slight CPU bottleneck
[22:10:10 CEST] <DHE> there is definitely a demuxer issue, I'm just trying to track it down
[22:11:39 CEST] <JEEB> cool
[22:13:50 CEST] <DHE> mpegts seems to show up everywhere. the ATSC broadcasts use it. it's common in IPTV. I even have a Component HD->USB capture device that outputs mpegts directly
[22:14:41 CEST] <JEEB> yeah, it's a simple streamable container
[22:15:05 CEST] <JEEB> also fun fact: if you try to use mpegts timestamps for remuxing you can get awful crap out in some cases.
[22:15:11 CEST] <JEEB> (in libavformat)
[22:15:26 CEST] <JEEB> a lot of stuff depends on the video/audio decoder to uncrap it
[22:15:28 CEST] <JEEB> :D
[22:15:49 CEST] <JEEB> thankfully it seems like it's a somewhat limited case though, not every stream causes those failures
[22:16:02 CEST] <JEEB> haven't had time to look into it more, but it seems like a general demuxer issue
[22:17:26 CEST] <DHE> maybe this is better suited to the dev channel..
[22:25:06 CEST] <dj_beirut> can burning subties be done when gpu transcoding  using vaapi?
[22:26:58 CEST] <DeHackEd> should be. burn them in using a filter so that the actual image going into the encoder has the text on them
[22:27:51 CEST] <dj_beirut> DeHackEd subtitles filter does not seem to be available when using vaapi.
[22:27:54 CEST] <jkqxz> dj_beirut:  There is no support for doing it on the GPU side, but downloading the surface, doing it on the CPU and uploading it again works.
[22:28:30 CEST] <dj_beirut> jkqxz can you please explain or show me an example ?
[22:28:34 CEST] <DeHackEd> is that a pure-GPU transcode? decode, reencode all in hardware?
[22:29:14 CEST] <Fyr> how much information is lost when converting from one codec into the same one?
[22:29:15 CEST] <jkqxz> What is does your transcode look like currently?
[22:29:41 CEST] <DeHackEd> Fyr: any decoding and re-encoding degrades the image unless a lossless codec is being used (unlikely for hardware accelerated)
[22:30:02 CEST] <Fyr> ok, DeHackEd,  can it be applied to audio codecs?
[22:31:24 CEST] <DeHackEd> if you only want to modify the video, the audio can usually be copied with "-c:a copy" which doesn't degrade the quality and is actually faster
[22:33:51 CEST] <JEEB> Fyr: it gets decoded and then re-encoded. you can't really do it any differently
[22:34:11 CEST] <JEEB> quality loss will happen with lossy formats
[22:48:36 CEST] <jkqxz> dj_beirut:  "ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format yuv420p -i in.mkv -vf 'subtitles=subs.srt,format=nv12,hwupload' -an -c:v h264_vaapi out.mkv" works for me, running at about 3/5 the speed of the raw transcode without burning subtitles.
[23:28:35 CEST] <dj_beirut> jkqxz i can't get it work. btw.. the subs are from a matroska webstream.
[23:28:44 CEST] <dj_beirut> so it's a live stream that has subs.
[23:36:45 CEST] <jkqxz> Also, I assume you have already made it work in the software-only case?  If not, then it's probably better to avoid hardware for now and solve whatever is stopping that working first.
[23:39:26 CEST] <dj_beirut> jkqxz never got it to work with ffmpeg. i am using vlc for that now. i think there is / was ffmpeg bug that didn't make it possible. or at least i didn't get it to work
[23:39:38 CEST] <Admin__> DHE, ty for looking at this
[23:39:52 CEST] <Admin__> i am going crazy here
[23:41:06 CEST] <DHE> Admin__: I have an explanation from the code, but no solution yet
[23:41:25 CEST] <Admin__> should i move to devel channel?
[23:42:03 CEST] <Admin__> yes i am looking my mind over it... i even tried different versions of ffmpeg... nothing... i tried to Generate fresh PTS and ignore DTS.. nothing.. nothing i do seems to help :(
[23:42:33 CEST] <Admin__> DHE, can you message me privately .. i have a private request ( if possible )
[23:50:56 CEST] <DHE> bit busy atm
[23:51:47 CEST] <prelude2004c> ok np.. so am i correct to understand this is some sort of PTS wrap around issue at 26.5 hours ?
[23:53:57 CEST] <DHE> yeah. the wrap code "handles" it but not exactly correctly
[23:54:13 CEST] <DHE> such that it happen at the 26.5 hour mark regardless of when you tune to the channel
[23:56:51 CEST] <prelude2004c> ok this is a live TS stream that i am transcoding into h264
[23:57:21 CEST] <prelude2004c> so ffmpeg -i < UDP live stream >  -c copy | nvtrascoder | ffmpeg -i - segment hls .m3u8
[23:57:38 CEST] <prelude2004c> so it seems that after 26.5 hours everything just stops and i have to restart in order to get the segments going again
[23:59:23 CEST] <prelude2004c> i am also having a problem with closed captions inside the video ( American stream ) , they are lost somehow.. i wonder if the problem is related or if there is some filter i can use on the input to demux and sort through everything before pushing it all to the video transcoder
[23:59:44 CEST] <prelude2004c> the problem is.. the transcoder does the decoding too for the streams which may also be in h264 but at a very large bit rate of 15Mbit/s or higher
[00:00:00 CEST] --- Sun May 29 2016


More information about the Ffmpeg-devel-irc mailing list