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

burek burek021 at gmail.com
Thu Dec 6 03:05:03 EET 2018


[00:27:44 CET] <tytyt> Please don't tell me it was this easy: ffmpeg -i image.mp4 test2.webp
[00:36:28 CET] <DHE> you get all defaults, which may or may not be what you want. usually the bitrate defaults are kinda poor
[02:37:06 CET] <rezonant> (i think my message was blocked cause i didnt identify with nickserv so ill repeat) -- so were getting 'no nvenc capable device' when transcoding an mpeg2 source to h264 -- transcoding mpeg4 -> 264 works just fine -- doesnt seem to matter if we use nvdec for decoding the source file or not, am i missing something?
[03:06:58 CET] <DHE> rezonant: you need the binary nvidia drivers installed, and a certain version that is compatible with ffmpeg.... and a suitable GPU, but anything with a fan on it is PROBABLY fine these days...
[03:12:01 CET] <furq> if it has gtx in the name and it's less than five years old then you're fine
[03:13:12 CET] <rjeli> make sure your NVIDIA drivers are new enough
[03:13:26 CET] <rjeli> ffmpeg needs them to be somewhat recent
[03:14:08 CET] <rjeli> wow libaom decoding is faster than i expected
[03:14:20 CET] <rjeli> real time 1080p hmmmmm
[03:26:48 CET] <Hello71> sounds suspiciously fast
[03:27:19 CET] <Hello71> isn't libaom fully single threaded? or is it just very poorly threaded
[03:28:09 CET] <Hello71> my mistake, aomdec is threaded just poorly
[03:56:42 CET] <rjeli> i thought so too
[03:58:01 CET] <rjeli> `/ffmpeg -c:v libaom-av1 -i ~/Downloads/Stream1_AV1_HD_2.7mbps\(1\).webm -f matroska - | ffplay -` runs real time on laptop i7
[03:58:24 CET] <rjeli> impressive!!
[03:59:40 CET] <rezonant> DHE furq rjeli -- we installed the latest drivers and nvenc is working for most transcodes -- problem is our mezzanine is MXF+mpeg2, so ideally we want to go from that to h264 -- other combinations work fine and dont show the "no nvenc capable device" error so i think its just a catchall message in this case
[03:59:52 CET] <rezonant> we were sure to specify a pixel format as well on these tests
[04:00:28 CET] <rjeli> whats a mezzanine
[04:00:38 CET] <rezonant> its a media industry term for "standard format"
[04:01:06 CET] <rezonant> its what our editors store the master copies in, mainly to avoid long waits for transcodes on the editor machines (we have beefier machines to do this centrally)
[04:02:00 CET] <furq> that sounds fun
[04:02:11 CET] <furq> apparently every gpu with nvenc has mpeg-2 decode in nvdev
[04:02:15 CET] <furq> nvdec
[04:02:24 CET] <rezonant> yeah thats what im seeing, and these are tesla k80s soooo
[04:02:28 CET] <rezonant> its not a hardware support issue
[04:03:02 CET] <rjeli> uh
[04:03:15 CET] <rjeli> one of the nvidia server chips doesnt have nvenc
[04:03:30 CET] <furq> this one does
[04:03:34 CET] <rezonant> well this one is specifically a server built for transcoding
[04:03:36 CET] <rezonant> interestingly, if we dont specify nvdec, it still doesnt work -- you would think ffmpeg would just use software decode to raw, then send the raw to nvenc -- but im not super versed in these bits so maybe thats not how it works
[04:03:36 CET] <furq> unless nvidia's website is lying again
[04:04:01 CET] <rezonant> obviously im not super concerned about the decode performance with mpeg2
[04:04:07 CET] <furq> rezonant: did you pastebin a command line anywhere
[04:04:16 CET] <rezonant> no i can get one though
[04:04:24 CET] <rjeli> oh k80s cant decode hevc
[04:04:39 CET] <rezonant> yeah but the MXF codec is mpeg2
[04:08:48 CET] <rjeli> ok my last piece of non advice is: sometimes after futzing with nvenc for a few hours and getting inconsistent errors i restart my computer and it works
[04:09:01 CET] <rjeli> it is definitely the case that the drivers can go into a bad state
[04:11:03 CET] <furq> i find it difficult to believe nvidia drivers would have such poor quality control
[04:17:20 CET] <rezonant> https://pastebin.com/d1kL0UZw
[04:17:25 CET] <rezonant> ^^ its about as simple as it gets
[04:18:50 CET] <furq> i think that should be -pix_fmt yuv420p
[04:18:53 CET] <furq> -pixel_format is an input option
[04:19:13 CET] <rezonant> oh
[04:19:19 CET] <rezonant> hrm lets try that
[04:22:31 CET] <rezonant> it says option pixel_format not found -- even though we used -pix-fmt yuv420p ....
[04:22:43 CET] <furq> - or _
[04:22:54 CET] <rezonant> sorry -pix_fmt yuv420p is what we used
[04:23:01 CET] <furq> is it in the same place
[04:24:34 CET] <rezonant> furq -- :-) no
[04:24:53 CET] <rezonant> furq you are the best
[04:24:59 CET] <rezonant> that was indeed the problem
[04:25:19 CET] <rezonant> so -pixel_format is input pixel format and -pix_fmt is the output format
[04:25:28 CET] <furq> yeah it's not confusing at all
[04:25:30 CET] <rezonant> ah the arcane knowledge of ffmpeg
[04:25:52 CET] <furq> you can try -c:v mpeg2_cuvid before -i but idk if that works with 4:2:2
[04:26:02 CET] <furq> m2v decoding in software should be quick enough anyway
[04:27:31 CET] <rezonant> yeah indeed, we'll play with the hardware decodes -- furq thanks so much for helping us figure this out -- my colleague and i were slamming our heads at the end of the day today haha
[04:53:02 CET] <rezonant> so it looks like the docs are wrong actually
[04:53:03 CET] <rezonant> https://trac.ffmpeg.org/wiki/HWAccelIntro#NVENC
[10:32:55 CET] <hans_> when trying to load https://trac.ffmpeg.org/wiki/Encode/H.264 i just get a "HTTP 503 Service Unavailable" error
[10:38:58 CET] <JEEB> yes, it seems to have been rather heavily loaded since yesterday or so
[11:18:15 CET] <alex``> Hi
[11:18:34 CET] <alex``> How to get the subtitle format?
[11:19:02 CET] <alex``> I would like to automate the extraction of subtitles
[11:20:22 CET] <alex``> > ffmpeg -i path/to/video.mkv -map 0:s:{stream} -f srt - 2> /dev/null
[11:20:35 CET] <alex``> I would like to know if ass or srt
[11:20:45 CET] <alex``> if the video is ass / srt*
[11:20:57 CET] <alex``> so that I could do
[11:21:34 CET] <alex``> > ffmpeg -i "$file" -map "0:s:$stream" "$directory/$name.$extension"
[11:26:47 CET] <ariyasu> i use mediainfo to output the files mediainfo to a txt file
[11:26:50 CET] <ariyasu> then greb it
[11:26:55 CET] <ariyasu> grep*
[11:44:35 CET] <relaxed> alex``: ffprobe -v error -select_streams s:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 input.mkv
[11:46:09 CET] <alex``> relaxed: Thanks!
[11:46:24 CET] <alex``> What individual switch do?
[11:46:51 CET] <alex``> I dont understand ffprobe man @_@
[11:48:49 CET] <hans_> alex``, ffprobe is there to probe a file for information.. what format? codex? compression? streams? ~
[11:50:24 CET] <alex``> is it hans_ which did mvi? ^^'
[11:50:46 CET] <hans_> nope, i'm a nobody
[11:51:10 CET] <alex``> for example -of default=noprint_wrappers=1:nokey=1, I dont understand this part
[11:51:34 CET] <alex``> and -v error
[11:52:06 CET] <relaxed> run it without those to see the results
[11:52:42 CET] <relaxed> https://trac.ffmpeg.org/wiki/FFprobeTips
[11:56:36 CET] <alex``> relaxed: Thanks (3
[11:57:01 CET] <relaxed> alex``: awk is my favorite, though :)  ffmpeg -i input.mkv 2>&1|awk '/Subtitle.*(ass|srt)/ {print $4}'
[11:59:23 CET] <alex``> I cannot map with ffmpeg subtitles index
[11:59:49 CET] <relaxed> pastebin.com what you're doing for help
[11:59:54 CET] <alex``> ffmpeg -i give global index (#0.4 for the first subtitles for example)
[12:00:39 CET] <alex``> have to go but I will when going back
[12:57:52 CET] <hans_> how can i strip the first 10 seconds of audio from a video file?
[12:58:12 CET] <hans_> (mp4 to be specific)
[13:01:21 CET] <c_14> as in silence that part of the audio?
[13:01:34 CET] <hans_> u
[13:01:35 CET] <hans_> yes
[13:01:44 CET] <hans_> keep the audio, except the first 10 seconds
[13:05:01 CET] <c_14> -af volume='if(lt(t,10),0,1)':eval=frame
[13:06:12 CET] <c_14> may need escaping, but that should work
[13:15:06 CET] <hans_> dang, thanks
[13:17:23 CET] <hans_> ffmpeg accepted -af volume=\''if(lt(t,10),0,1)':eval=frame\'   - it'll take a while to know if it worked or not tho
[13:18:05 CET] <hans_> ... i have no idea what i'm doing tho, does that seem correct-ish?
[13:19:27 CET] <ariyasu> you could add like -t 15 before the -i
[13:19:53 CET] <ariyasu> then it will only process the first 15 seconds of the video, then you can see if the first 10 seconds are muted
[13:20:12 CET] <ariyasu> -t is good for testing before reworking a big file
[13:20:56 CET] <hans_> good point, should have done that
[13:21:06 CET] <hans_> mhm
[13:35:32 CET] <c_14> you can still do it in parallel with a different output file just to test
[13:35:46 CET] <c_14> it'll steal a bit of cpu time from the other process but it should be fine
[14:06:31 CET] <Zgrokl> Hello what is the thing that make that the audio stream 0:2 goes to default ?
[14:06:36 CET] <Zgrokl> and how can i change that ?
[14:06:46 CET] <Zgrokl> i taugh default is 0:0 but not
[14:27:34 CET] <Zgrokl> ok founded its : -disposition
[15:49:25 CET] <e4xit> I have a mixture of FLAC (vinyl rip) files which are 96KHz, 48KHz and 44.1KHz * 32bit, 24bit and 16bit. I would like to recursively pass the folder to FFmpeg to convert them all to ALAC, ideally 44.1KHz/16Bit. Is there a _best_ parameter combination for this, or do I have to trial and error to see which sounds _best_ to me?
[15:53:35 CET] <DHE> well the recursive thing isn't something ffmpeg does. you'll have to script it up, maybe find/xargs or such
[15:54:51 CET] <e4xit> yes I can do that bit in fish shell, sorry
[15:55:39 CET] <Zgrokl> e4xit, go with parrallel for fatest process
[15:55:51 CET] <pink_mist> afaik you'll lose information if you transcode to a different bit and khz ... so choosing ALAC seems less than ideal
[15:56:00 CET] <pink_mist> but it's your data
[15:59:02 CET] <e4xit> bah yeah I know
[15:59:44 CET] <e4xit> yeah I know :( seems like advice is to use dithering, and perhaps only resample 96KHz to 48KHz (even multiple)?
[16:17:54 CET] <BtbN> Why resample at all?
[16:22:16 CET] <e4xit> save 1/3rd space on 150GB of files?
[16:22:52 CET] <e4xit> once of the 96KHz 32bit files I reduced to 44.1KHz 16bit was 153MB vs 45MB, I guess it adds up
[16:26:24 CET] <e4xit> would a better approach be to keep the sample rate at 96KHz and move to 16bit? This still reduces files size by half using my quick tests
[16:28:55 CET] <pink_mist> I mean
[16:29:00 CET] <pink_mist> you're losing information
[16:29:10 CET] <pink_mist> so there's no point at all in using a lossless codec
[16:29:18 CET] <pink_mist> if your goal is to save space
[16:29:33 CET] <pink_mist> find a lossy format that's good enough for you.
[16:33:03 CET] <e4xit> so it's the same to convert 96KHz 32Bit FLAC to 44.1KHz 16Bit ALAC, as to convert it to AAC 256kbps just because I lose some info each way?
[16:35:54 CET] <AsumFace> hello, is there a way to have a filter such as 'select=gt(scene,0.03)' determine the scene change based on a downscaled (or otherwise processed) version of the stream, but pass the selected frames in full resolution forward?
[16:36:23 CET] <pink_mist> e4xit: I'd expect so
[16:36:36 CET] <pink_mist> e4xit: but you should really compare with your own ears
[16:42:33 CET] <e4xit> pink_mist: It seems iTunes can handle 96KHz 24Bit ALAC now, so I will just convert 32Bit to 24Bit using a dither and leave the sample rate alone. Thanks for you help
[16:53:03 CET] <Zgrokl> how to only reencode a specific audio stream and copy everything else ?
[16:53:16 CET] <Zgrokl> i tried -c:a:4 aac but doesn't work
[16:53:38 CET] <kepstin> Zgrokl: "-c copy -c:a:4 aac" or something similar will do it
[16:53:55 CET] <kepstin> sets copy mode on all streams, then overrides it on one particular stream
[16:54:10 CET] <Zgrokl> command are working but showing : Stream mapping: Stream #0:4 -> #0:4 (copy)
[16:54:25 CET] <Zgrokl> he doesn't reencode the 4 stream
[16:54:43 CET] <kepstin> probably a typo or option ordering issue. please show us your entire ffmpeg command line.
[16:55:32 CET] <kepstin> also note that stream 0:4 is different from a:4
[16:56:06 CET] <Zgrokl> kepstin, : /usr/bin/ffmpeg -i "http://xxx" -map 0 -disposition:a:4 default -disposition:a:1 none -c copy -c:a:4 aac -f mpegts "xxx"
[16:56:17 CET] <kepstin> (0:4 means "the fourth track of any type from file 0" and 0:a:4 means "the fourth *audio* track from file 0")
[16:57:19 CET] <kepstin> Zgrokl: can you pastebin the ffmpeg output as well please, so I can see the stream mapping?
[16:58:09 CET] <Zgrokl> problem seems to be 0:a:4
[16:58:42 CET] <Zgrokl> now it's say invalid encoder type aac, but thats the free lib of aac no ?
[16:59:22 CET] <Zgrokl> kepstin, https://pastebin.com/raw/fbJsY29X
[17:03:02 CET] <Zgrokl> kepstin, so what is the correct command ? -c:0:4 ?
[17:04:48 CET] <kepstin> either -c:0:4 (or just -c:4) or -c:a:1 should work. See https://ffmpeg.org/ffmpeg.html#Stream-specifiers-1
[17:06:42 CET] <Zgrokl> ooooookay now it's working
[17:06:58 CET] <Zgrokl> -b:4 120k seems to work too
[17:07:02 CET] <kepstin> (hmm I had an off by one error, :4 means the fifth track, because it starts at 0)
[17:35:07 CET] <Zgrokl> kepstin, only is now the default audio track is reseted
[17:35:25 CET] <Zgrokl> i want to track 0:4 to be the default audio
[17:35:39 CET] <kepstin> then fix the stream selectors on your -disposition options too
[17:35:40 CET] <Zgrokl> 0 -disposition:a:4 default -disposition:a:1 none or 0 -disposition:0:4 default -disposition:0:1 none
[17:35:45 CET] <Zgrokl> doesn't work
[17:36:37 CET] <Zgrokl> Ohhhh it's :4
[17:40:32 CET] <devp> Hello, how i could get just the audio on a source from mpeg-dash stream ? I've got the .mpd file with the range of bytes.
[18:17:00 CET] <Zgrokl> kepstin, i don't understand i can set none but not default
[19:07:47 CET] <jinboli> Hello, I'm working on using hardware acceleration on HD video call. It works well on video resolution lower than 1280x720 but when the resolution gets larger, I got tons of warning from RTP saying "delay reached. need to consume packet""missed -1 packets" It seems the packet is too large so part of the information is missed. Does anyone know how to fix it?
[19:17:16 CET] <terminalator> How does one converts multiple flac files to multiple mp3 files?
[19:18:39 CET] <furq> you run ffmpeg multiple times
[19:18:40 CET] <terminalator> I want to converts a couple of Christmas albums to mp3, but don't want go through the hassle of doing each file manually
[19:19:20 CET] <terminalator> furq: Can't I achieve this by simply running one command?
[19:19:27 CET] <furq> one shell command, sure
[19:19:32 CET] <furq> what os are you on
[19:19:59 CET] <terminalator> Xubuntu
[19:20:23 CET] <terminalator> furq: A simple bash script is also fine
[19:20:42 CET] <BtbN> Just use a for loop oneliner
[19:20:42 CET] <furq> for f in *.flac; do ffmpeg -i "$f" -c:a libmp3lame -q:a 0 "${f%.*}.mp3"; done
[19:21:14 CET] <terminalator> I thank you kindly gents :)
[19:21:14 CET] <furq> also consider using something less ancient than mp3
[19:21:38 CET] <terminalator> furq: What would you suggest?
[19:21:51 CET] <furq> opus if your device supports it, otherwise aac
[19:22:02 CET] <terminalator> Cool, thanks
[19:22:18 CET] <furq> -c:a libopus -b:a 128k
[19:22:26 CET] <furq> should be transparent for most stuff
[19:24:34 CET] <terminalator> Noice :)
[23:40:31 CET] <saml> is there something more reliable than image2? I have image file named without file extension
[23:42:50 CET] <furq> the file extension shouldn't make any difference
[23:58:54 CET] <TheAMM> You can specify the input codec if you know it and assume it can't be probed
[00:00:00 CET] --- Thu Dec  6 2018


More information about the Ffmpeg-devel-irc mailing list