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

burek burek021 at gmail.com
Fri Sep 15 03:05:01 EEST 2017


[05:04:21 CEST] <sir123> Hello, this question is not ffmpeg-specific. I have a big h264 video with DTS sound, and want to transcode the file into a patent-unencumbered format. I've looked into the ogg format, but I can't find a lossless video format made by Xiph.org. Any recommendations?
[05:05:56 CEST] <c3-Win> VP9 or AV1 as the video codec?
[05:07:43 CEST] <kepstin> sir123: are you sure you want lossless? unless the h264 file is originally lossless, that's gonna be a huge increase in filesize
[05:08:26 CEST] <sir123> kepstin: It's a blu-ray rip, so I don't know if it is originally lossless
[05:08:56 CEST] <kepstin> definitely not, blu-ray doesn't support lossless, and most rips that are obtained ... indirectly ... have been lossy re-encoded for file size
[05:09:20 CEST] <sir123> I ripped it myself from MakeMKV
[05:09:37 CEST] <sir123> I have the blu-ray here lol
[05:09:41 CEST] <kepstin> so yeah, use vp9, expect a slight quality loss (should be able to keep it unnoticable from a bd source), it'll be very slow
[05:11:47 CEST] <kepstin> use opus audio (or if the original is lossless - some recent bds do have lossless audio, labeled 'dts master audio' - then use flac instead if you like)
[05:13:04 CEST] <sir123> So, from what I can gather, media has different encoding systems for audio and video, so Opus handles audio, for instance. And video has some other formats, too. So then you need a container format for handling both (and text) in a single file. Is that right?
[05:13:38 CEST] <kepstin> yes. Use mkv aka matroska (or webm, which is just mkv with a different name and restricted codec list).
[05:15:20 CEST] <kepstin> if your file has subtitles, make sure to use "-c:s copy" in ffmpeg so they pass through untouched - bd subs are an image format.
[05:21:59 CEST] <sir123> Ok, so a VP9 video format with Opus audio, copy the subtitles all in a Matroska container?
[05:24:46 CEST] <sir123> Why would I use MKV when I could use WebM?
[05:41:50 CEST] <sir123> how can i work out the best bitrate for my file?
[08:28:50 CEST] <Puggy> Well, why do I get "Context scratch buffers could not be allocated due to unknown size." when I try to use -hwaccel vdpau but doesn't occur otherwise.
[08:35:59 CEST] <Puggy> nvm
[08:36:07 CEST] <Puggy> Just gonna use CPU encoding/decoding, works fine .-.
[08:36:11 CEST] <Puggy> I have a GTX 1050 Ti
[13:13:43 CEST] <redrabbit> i use cpu decoding and nvenc encoding
[13:13:57 CEST] <redrabbit> gives me more flexibity with input formats for iptv
[13:14:10 CEST] <redrabbit> but if i know its a AVC source i use the hw decoders as well
[13:15:10 CEST] Action: redrabbit wonders if there is 1 command with hw decoding that accepts both mpeg2 and avc 
[13:15:32 CEST] <redrabbit> (nvidia 1060)
[16:54:21 CEST] <JohnJay> ;/j #diy
[17:41:21 CEST] <JohnJay> Hmm. So there's no way I can do ffmpeg -i mylist.txt output.mp3 where mylist.txt is just "file output.mp3" several times?
[17:41:32 CEST] <JohnJay> I'm trying to duplicate an audio file
[17:41:56 CEST] <c_14> If you want to duplicate an audio file just cp file.mp3 duplicate.mp3 ?
[17:42:05 CEST] <c_14> But no, you can't reference the output file in the input
[17:42:08 CEST] <c_14> How would that even work?
[17:42:36 CEST] <JohnJay> it doesn't work
[17:42:46 CEST] <JohnJay> I'm on a windows box atm, don't know how to concat
[17:42:56 CEST] <JohnJay> can you even just cat mp3 files together? does that even work?
[17:43:08 CEST] <c_14> should work afaik
[17:43:18 CEST] <c_14> but what you want is https://trac.ffmpeg.org/wiki/Concatenate#demuxer
[17:43:50 CEST] <c_14> where the file is repeated "file input.mp3" and your output is output.mp3
[17:47:32 CEST] <JohnJay> right, I tried that but ou still have to rename the output
[17:47:39 CEST] <alphabet> # ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -filter_complex concat=n=3:v=0:a=1 output.mp3 ??
[17:47:39 CEST] <alphabet>   ?
[17:47:43 CEST] <JohnJay> but apparently you can just concatenate mp3 files together and it works. lol
[17:48:13 CEST] <JohnJay> alphabet: very funny
[17:48:36 CEST] <JohnJay> anyway apparently on windows you have to tell copy the /b option or it won't work on binary files
[17:49:04 CEST] <JohnJay> not even sure what it means to treat a binary file as a text file and screw it up
[17:49:09 CEST] <JohnJay> but that's what it does if you forget it
[17:52:10 CEST] <JohnJay> well
[17:52:22 CEST] <JohnJay> apparently appending mp3 files together doesn't always work
[17:52:32 CEST] <JohnJay> I tried appending some files with a 10 second mp3 of silence
[17:52:38 CEST] <JohnJay> and it doesn't seem to work
[18:05:22 CEST] <Kuukunen-> JohnJay: well first of all you have to understand the times windows users use copy to concatenate anything are extremely rare :P
[18:07:30 CEST] <JohnJay> I'm more frustrated by the concatenation thing not working
[18:08:12 CEST] <JohnJay> Maybe I have to do it alphabet's way after all
[18:09:54 CEST] <JohnJay> apparently \n doesn't work in echo either. goddammit
[18:12:20 CEST] <Kuukunen-> I don't think mp3 is a format that really officially supports concatenation anyway, or......?
[18:12:36 CEST] <Kuukunen-> most formats don't
[18:14:29 CEST] <JohnJay> I tried this from the documentation and it didn't work: ffmpeg -i "Ohio Part 002.mp3" -i 10SecSilence.mp3 -filter_complex "[0:a:0] [1:a:0] concat=n=2:a=1 [a]" -map "[a]" blah.mp3
[18:15:36 CEST] <JohnJay> the command alphabet wrote at least lets ffmpeg run
[18:15:51 CEST] <JohnJay> I think it's reencoding the whole file
[18:17:04 CEST] <JohnJay> nice, it worked
[18:17:30 CEST] <JohnJay> although now vlc player displays a fluctuating number for total file length
[18:18:50 CEST] <JohnJay> Kuukunen-: apparently it supports concatenation as long as the second thing you're concating isn't silence. XD
[18:22:08 CEST] <JohnJay> anyway that command seems to do the trick
[18:22:15 CEST] <JohnJay> i can hear the 10 second silence at the end of the file now
[21:12:56 CEST] <bencc> is there a recommended docker image that build ffmpeg from master with result similar to the ubuntu package?
[21:13:18 CEST] <bencc> or maybe I can just take the ubuntu deb package and replace the ffmpeg source with master?
[21:21:37 CEST] <DHE> a docker image to compile ffmpeg? that's asking a lot. ffmpeg has a lot of optional but recommended 3rd party libraries (libx264 just being the most popular) and such an image will require a compiler
[21:26:36 CEST] <bencc> a docker image that compiles ffmpeg
[21:27:22 CEST] <c_14> just copy the configure line that ffmpeg prints
[21:27:32 CEST] <c_14> along with the recent --disable-autodetect builds should be pretty easy to reproduce
[21:28:30 CEST] <bencc> what does --disable-autodetect do?
[21:28:36 CEST] <bencc> I don't see it in the commit message
[21:28:40 CEST] <bencc> https://patchwork.ffmpeg.org/patch/4492/
[21:28:41 CEST] <c_14> What does it sound like it does?
[21:28:45 CEST] <c_14> Disables autodetection of libraries
[21:29:00 CEST] <c_14> >disable automatically detected external libraries [no]
[21:29:11 CEST] <bencc> ok
[21:41:30 CEST] <JohnJay> kjh
[21:41:46 CEST] <JohnJay> oh i didn't disconnect, amazing
[22:41:35 CEST] <selsta> is there a difference between setting frame_size in AVCodec and AVCodecParameters?
[22:41:48 CEST] <Mavrik> Second one is the new API IIRC
[22:42:32 CEST] <selsta> thats why Im trying to change it but my program only works when I set it in AVCodec
[22:43:57 CEST] <selsta> setting sample_rate works
[22:54:25 CEST] <faLUCE> hello. How can I split myfile.mp3 into two chunks, the first one starting at 00:00:00 and ending at 00:02:10, the second one starting at the end of first chunk and ending at 00:04:30 ?
[22:55:52 CEST] <JohnJay> faLUCE: the -ss and -to options should work
[22:56:02 CEST] <JohnJay> I had trouble with the -to option not taking the right format or something though
[22:56:38 CEST] <faLUCE> JohnJay: but how can I produce multiple files?
[22:56:54 CEST] <JohnJay> The documentation when I looked at it said you can't, you have to do a loop
[22:57:02 CEST] <JohnJay> i'm no expert though
[22:57:37 CEST] <JohnJay> oh wait there was something like that
[22:57:48 CEST] <JohnJay> sorry lol i forgot about it
[22:57:54 CEST] <JohnJay> there's a segment filter that does that
[22:58:15 CEST] <JohnJay> ffmpeg -i input.mp4 -c copy -map 0 -segment_time 8 -f segment output%03d.mp4
[22:58:19 CEST] <JohnJay> the 8 is 8 seconds
[22:58:49 CEST] <JohnJay> However make sure you put the right filename at the end. I left it as .mp4 and it produced mp3 files but named them mp4 and confused me
[22:59:19 CEST] <JohnJay> The reason I've been fiddling with this is I bought an mp3 player for when I exercise
[22:59:31 CEST] <JohnJay> But it ONLY takes mp3. So I have to convert anything I want to listen to to mp3
[23:00:01 CEST] <JohnJay> since I only workout for an hour I needed a way to segment longer files into 45 minute chunks
[23:00:46 CEST] <faLUCE> JohnJay: thanks, but I don't understand how to generate the two lengths I said before with your syntax
[23:02:42 CEST] <JohnJay> oh i see. yeah the latter method automatically produces multiple files but takes a fixed length
[23:03:00 CEST] <JohnJay> to do what you want you'll have to use the -ss and -t options probably
[23:03:58 CEST] <JohnJay> or you could segment the file into units of 2:10 and then combine the last 2 together maybe...
[23:04:19 CEST] <faLUCE> JohnJay: never mind if you don't know the syntax for the commanbd
[23:04:36 CEST] <JohnJay> Syntax for what command
[23:04:42 CEST] <JohnJay> I just gave 2 different commands
[23:05:25 CEST] <faLUCE> JohnJay: I would like to produce the two files that I said before with one command
[23:05:41 CEST] <faLUCE> they have different lengths
[23:05:54 CEST] <JohnJay> well if there's a way to do that I'd like to learn about it too
[23:05:59 CEST] <JohnJay> maybe furq or someone can give the answer
[00:00:00 CEST] --- Fri Sep 15 2017


More information about the Ffmpeg-devel-irc mailing list