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

burek burek021 at gmail.com
Thu Nov 23 03:05:01 EET 2017


[01:12:21 CET] <degenerate> dudes, i'm losing my mind with this friggin MTS file.
[01:12:23 CET] <degenerate> https://uccdn.bid13.com/original_videos/K/b/KbV6bQ0AafgkPV37s4UeA1PNnWpV1TRhinYiTAIvPzG.MTS
[01:13:06 CET] <degenerate> the file reports (via ffprobe, vlc, and adobe after effects / premier) as being 1440px by 1080px
[01:13:24 CET] <degenerate> which is 4:3
[01:13:48 CET] <degenerate> but if you actually open it, and play it in a media player, and full screen it on a 16:9 monitor, it is not letterboxed
[01:14:13 CET] <degenerate> infact i think the actual resolution of it is 1920x1080, but i'm not 100% sure.
[01:15:51 CET] <degenerate> i guess all of the tools listed above are just looking at the exif metadata?
[01:17:41 CET] <furq> degenerate: what does ffprobe say the sar and dar are
[01:18:23 CET] <degenerate> http://termbin.com/g6xx
[01:18:33 CET] <degenerate> [SAR 4:3 DAR 16:9]
[01:18:38 CET] <furq> well yeah
[01:18:39 CET] <furq> DAR 16:9
[01:18:48 CET] <degenerate> i don't understand
[01:18:56 CET] <furq> dar = display aspect ratio
[01:19:05 CET] <furq> it's stretched on playback
[01:19:39 CET] <degenerate> so if i understand correctly, it is actually 1440px wide, but when it plays it back, it stretches that to 1920 ?
[01:19:42 CET] <furq> yes
[01:19:44 CET] <furq> it's pretty common
[01:19:55 CET] <degenerate> wow thats wonky, i didn't know that that was a thing
[01:20:07 CET] <degenerate> thank you for helping me understand.
[01:20:37 CET] <degenerate> maybe this is the wrong approach, but is there some way that i could convert the file to 1920x1080 ?
[01:20:46 CET] <furq> not without reencoding it
[01:20:53 CET] <degenerate> re-encoding is fine.
[01:21:05 CET] <furq> reencode with -s 1920x1080 then
[01:21:09 CET] <furq> i generally wouldn't do that though
[01:22:09 CET] <furq> i don't know of any player that doesn't support anamorphic content, and anything that doesn't should be buried at sea
[01:22:22 CET] <DHE> heck most old NTSC videos were captured at 720x480 despite being 4:3
[01:22:33 CET] <DHE> (god that was annoying)
[01:22:35 CET] <furq> or 16:9
[01:22:54 CET] <furq> probably less so for video but dvd is the same thing
[01:23:23 CET] <DHE> once upon a time (like when I was in highschool) I captured a recording from VHS to PC. it came out wide
[01:23:28 CET] <furq> literally every dvd is stretched on playback
[01:23:35 CET] <degenerate> hahah just my shitty script that doesn't support anamorphic content
[01:23:38 CET] <degenerate> cause i didn't even know about it
[01:23:53 CET] <furq> if you're resizing it then just add -aspect 16:9
[01:23:58 CET] <furq> or -vf setdar=16:9
[01:24:16 CET] <DHE> by default ffmpeg tries to retain the DAR unless you explicitly override it. giving a strange scale option will result in non-square (or generally changed-shape) pixels
[01:24:37 CET] <degenerate> i'm doing a bit of automated video processing. and i'm lettingboxing videos that aren't 16:9, because my output is 16:9. but this video was getting letterboxed cause i was basing it off the resolution incorrectly.
[01:24:44 CET] <furq> oh right
[01:24:45 CET] <degenerate> anywhooo thanks for hte help i think ican fix this now
[01:26:18 CET] <furq> shame ffprobe doesn't have a "display width" param like mediainfo does (iirc)
[01:26:23 CET] <furq> but you could presumably just do height * dar
[01:26:51 CET] <degenerate> actually maybe one more question.
[01:27:47 CET] <degenerate> so i've got a motion graphic that is saved at 1920x1080, and i want to concatenate that infront of this video that is 1440x1080 (but DAR 16:9), what would be the best way? i am thinking i would first try to convert that 1440x1080 to 1920x1080, but maybe this is wrong?
[01:28:20 CET] <furq> resize whichever is shorter
[01:30:12 CET] <furq> either works but if this is some automated process then you probably want to resize the bumper in case you have to process any more 1440x1080 clips
[01:30:17 CET] <degenerate> ok, so lets say i want to resize the video that is 1440x1080 [SAR 4:3 DAR 16:9]  into 1920x1080 [SAR 1:1 DAR 16:9]
[01:31:25 CET] <furq> just -vf scale=1920:1080
[01:33:53 CET] <degenerate> ok that appears to have worked.
[01:33:56 CET] <degenerate> thanks for your help furq
[03:37:30 CET] <Sid__> Hi, can we encrypt and package dash segments with latest master branch code? I notice that mp4 is encrypting, but is there any tweak to have encryption done in dash ?
[05:49:53 CET] <bray90820> So I am converting a file with this script
[05:49:54 CET] <bray90820> ffmpeg -i "File.mkv" -c:a copy "File.mp4"
[05:50:34 CET] <bray90820> Would that send 2.0 and 5.1 if I had both in the mkv file
[05:57:38 CET] <Sid__>  -1 down vote favorite Is it possible to encrypt mpeg-dash clear content in ffmpeg? or do we need to additional code to handle the encryption?  From ffmpeg dashenc.c code it appears that dash code does not encrypt the content. Can we reuse the mp4 muxer for encrypting and dash for segmenting?
[05:57:47 CET] <Sid__> Is it possible to encrypt mpeg-dash clear content in ffmpeg? or do we need to additional code to handle the encryption?  From ffmpeg dashenc.c code it appears that dash code does not encrypt the content. Can we reuse the mp4 muxer for encrypting and dash for segmenting?
[06:09:58 CET] <atwar> How do I cropdetect black bars with white text on them?
[07:03:39 CET] <bray90820> Anyone around?
[07:19:16 CET] <zyme> are there any special builds of ffmpeg that automatically utilize GPU decoding +/or CPU encoding enhancements by default without specifying it?
[07:20:14 CET] <zyme> or would one have to retrieve the source, build tools, and create they're own mini-fork?
[12:50:21 CET] <mz_> Hey, anyone here willing to explain AVFormatContext start_time a bit?
[12:52:40 CET] <mz_> E.g. how does it affect seeking (should it be added to the seek timestamp?) and best effort timestamps
[12:53:48 CET] <mz_> As well as why some files have negative start_time, and yet ffmpeg stdout log shows a positive value
[13:12:56 CET] <hepek> @mz, I have no idea :)
[20:34:33 CET] <TheRock> does ffmpeg support xp?
[20:34:37 CET] <TheRock> if i compile it myself
[20:35:42 CET] <sfan5> probably
[20:36:49 CET] <marek_> hi everybody
[20:38:01 CET] <marek_> I have a quick question I am piping audio to ffmpeg using fifo but the sound is much more faster 1 minute of audio becomes 13 seconds
[20:38:16 CET] <marek_> can anybody tell me what should i look for
[20:38:18 CET] <marek_> ?
[20:43:44 CET] <grummund> How to burst a movie file into image files, skipping sections without significant movement?
[20:44:14 CET] <grummund> ffmpeg -i file.MOV -vf "select='gt(scene,0.02)'" file_%04d.png
[20:44:38 CET] <relaxed> marek_: what are you piping?
[20:46:05 CET] <grummund> this command produces a series of *identical* images
[20:47:16 CET] <marek_> I am piping with portaudio format: u16le  44100Hz 2 channels
[20:47:34 CET] <marek_> raw audio
[20:49:37 CET] <relaxed> pipecommand | ffmpeg -f u16le -sample_rate 44100 -channels 2 -i - ...
[20:50:05 CET] <relaxed> ^^^ is that what you're using?
[20:51:13 CET] <marek_> yes
[20:51:56 CET] <marek_>  ./ffmpeg -y -f s16le -ar 44100 -ac 2 -i /tmp/aaa -acodec copy outpu2.wav -v debug
[20:53:20 CET] <relaxed> no, look at the output of "ffmpeg -h demuxer=u16le"
[20:53:50 CET] <relaxed> use -sample_rate and -channels
[20:55:09 CET] <relaxed> plus your input is unsigned, use -f u16le
[21:00:10 CET] <TheRock> is it possible to compress a h264 video file that is only partially available
[21:00:51 CET] <TheRock> i mean incomplete
[21:01:20 CET] <marek_> as input I am using PaInt16
[21:01:36 CET] <marek_> thats signed...
[21:02:48 CET] <marek_> anyways unsinged says that its not supported with wav
[21:03:01 CET] <marek_> if I copy the codec
[21:03:16 CET] <marek_> when I encode then I get 0 bytes in wav
[21:04:36 CET] <relaxed> -c copy -f wav output ?
[21:05:01 CET] <relaxed> oh
[21:06:21 CET] <marek_> [wav @ 0x7ffbb784b200] pcm_u16be codec not supported in WAVE format
[21:07:07 CET] <marek_> sry, not u16be but u16le
[21:08:14 CET] <relaxed> marek_: ffmpeg -f u16le -sample_rate 44100 -channels 2 -i - out.wav
[21:08:35 CET] <relaxed> should still be lossless
[21:10:50 CET] <grummund> this seems to work...
[21:10:53 CET] <grummund> ffmpeg -i file.MOV -vf "select='gt(scene,0.01)'" -vsync vfr file_%04d.png
[21:11:17 CET] <grummund> how to combine that with filter eq(pict_type,PICT_TYPE_I) ?
[21:12:16 CET] <wouter> is there a way to ask in a machine-parseable way whether the libfdk_aac codec is enabled in the current build of ffmpeg?
[21:12:51 CET] <wouter> ffprobe has -print_format json, which is awesome, but ffmpeg doesn't seem to
[21:13:24 CET] <relaxed> ffmpeg -codecs -hide_banner 2>&1| grep libfdk_aac
[21:13:36 CET] <wouter> and ffprobe -print_format json -codecs doesn't give me any information
[21:13:57 CET] <wouter> relaxed: well, yeah, I can parse something that isn't machine-parseable, but that's fragile and not what I'd like to do
[21:16:12 CET] <relaxed> if ffmpeg -codecs -hide_banner 2>&1| grep libfdk_aac >/dev/null 2>&1; then echo "libfdk_aac is enabled"; fi
[21:16:45 CET] <wouter> relaxed: that's a very long way to say "no"...
[21:17:16 CET] <kepstin> if you were using libavcodec rather than the cli tool, there are apis to try to load specific codecs that you'd use to check
[21:18:26 CET] <kepstin> but hmm. You could always do the good old "try and see if it works", but it would be hard to tell an error "there's no libfdk_aac" from any number of other issues that could happen.
[21:18:29 CET] <wouter> I'm actually calling ffmpeg with various options from perl, as per https://github.com/yoe/sreview/blob/master/lib/SReview/Video.pm and .../Videopipe.pm
[21:19:53 CET] <kepstin> hmm, i'm kind of disappointed that "ffmpeg -h encoder=nonexistant" doesn't return an error status.
[21:43:08 CET] <ho0pla> hello all
[21:44:11 CET] <ho0pla> anyone here?
[22:14:21 CET] <grummund> is -frame_pts 1 supposed to replace %d with pts instead of serially incrementing number?  does it work?
[22:16:47 CET] <kepstin> grummund: gonna need more context than that, "-frame_pts" isn't a general ffmpeg option or something I recognize.
[22:17:00 CET] <grummund> ffmpeg -i file.MOV -frame_pts true file_%04d.png
[22:17:33 CET] <grummund> -frame_pts is described here - https://ffmpeg.org/ffmpeg-formats.html
[22:17:53 CET] <grummund> it's having no effect in the above command though
[22:23:01 CET] <kepstin> hmm, strange, I wonder if that's been added fairly recently
[22:23:12 CET] <kepstin> that option isn't present in the ffmpeg build I have on this machine
[22:23:34 CET] <kepstin> (check your ffmpeg by running "ffmpeg -h muxer=image2" and see if it's in the list
[22:23:35 CET] <kepstin> )
[22:26:27 CET] <kepstin> yep, code for that was only added this month as far as I can tell, you'd probably have to use a git build of ffmpeg to get it
[22:38:11 CET] <grummund> yeah built ffmpeg from git just today
[22:38:47 CET] <grummund> maybe that option isn't working?
[22:39:06 CET] <kepstin> looks like it should be fine
[22:39:36 CET] <kepstin> note that in many cases, the pts *will* be a serially incrementing number, depending on the input format and other factors.
[22:41:38 CET] <BtbN> in most cases, actually
[22:41:59 CET] <BtbN> timebase will be selected in such a way that the pts is just simple incrementing numbers
[22:43:36 CET] <grummund> what about together with say -vf "fps=1/20" ?
[22:43:55 CET] <kepstin> grummund: the output of the fps filter will always be serially incrementing numbers
[22:44:05 CET] <kepstin> that's an explicit "clean up these pts values" filter :)
[22:44:21 CET] <BtbN> well, that'd be setpts
[22:44:38 CET] <kepstin> well, you can use setpts to mess up timestamps instead, if you like :)
[22:45:39 CET] Action: grummund doesn'y *actually* need pts :-p
[22:46:35 CET] <kepstin> well, if you have files with pts in the filename, and you know the timebase for that pts, then you can in theory perfectly reconstruct the video again later.
[22:47:30 CET] <kepstin> the trick is finding out the timebase, i guess :)
[22:47:50 CET] <grummund> any number relating to the original frame will do
[22:48:38 CET] <BtbN> tell it to passthrough the original timestamps then
[22:48:47 CET] <BtbN> no idea if that makes it to the very end of the chain though
[22:57:40 CET] <grummund> this seems better -
[22:57:44 CET] <grummund> ffmpeg -i file.MOV -vf "fps=1, select='gt(scene,0.001)'" -vsync vfr -frame_pts 1 file_%04d.png
[22:57:56 CET] <TheRock> is there a command to build a minimal ffmpeg
[22:58:05 CET] <TheRock> i only need "player " functionality with h264
[22:58:18 CET] <kepstin> TheRock: there's lots of possible commands to build different minimal ffmpegs
[22:58:53 CET] <durandal_1707> TheRock: -disable-everything
[22:59:16 CET] <kepstin> TheRock: if you can figure out the exact list of demuxers, decoders, etc. you need then you can pass those to the ffmpeg configure to enable only them.
[23:01:47 CET] <TheRock> i see, -disable-everything sounds promising
[23:01:59 CET] <TheRock> but i need to figure out what i have to enable to play only video files, such as .avi. mp4
[23:02:11 CET] <TheRock> can you give me a hint?
[23:03:41 CET] <durandal_1707> -enable-demuxer=avi,mp4,mpv
[23:03:54 CET] <durandal_1707> get idea?
[23:04:16 CET] <grummund> TheRock: did you look at ./configure --help ?
[23:04:37 CET] <TheRock> yeah, i will figure it out
[23:05:01 CET] <TheRock> -enable-decoder/encoder h264 is not required for playing?
[23:05:13 CET] <TheRock> just for processing video files, i assume?
[23:05:25 CET] <BtbN> playing a video is processing it
[23:05:49 CET] <durandal_1707> you need parser too
[23:06:17 CET] <TheRock> and audio
[23:06:26 CET] <TheRock> kk i will try my best
[23:06:45 CET] <durandal_1707> what kind of audio?
[23:07:11 CET] <TheRock> the audio which is added to the video file?
[23:07:22 CET] <TheRock> else i would only get a video w/o audio?
[23:07:28 CET] <durandal_1707> there are many audio codecs
[23:07:47 CET] <echelon> hi, how do i rip a dvd including all audio and subtitle streams?
[23:07:50 CET] <TheRock> yeah, so it's not easy to build it for the broad video files support
[23:08:34 CET] <sfan5> echelon: better use a specialized program for that
[23:08:54 CET] <durandal_1707> TheRock: its easy, once you figure what code you need
[23:09:08 CET] <echelon> sfan5: i've used ffmpeg to rip a dvd before..
[23:09:22 CET] <sfan5> then wouldn't you know how to do it already?
[23:09:30 CET] <echelon> i know you have to map all the streams, but how do you tell them apart
[23:09:34 CET] <echelon> if there's multiple streams
[23:09:39 CET] <echelon> https://paste.ee/r/15oSY
[23:09:57 CET] <TheRock> the video player is integrated in a Qt app
[23:10:06 CET] <TheRock> people using it can play any mp4
[23:10:08 CET] <TheRock> any codec
[23:10:46 CET] <TheRock> i just try to reduze the binary size a little bit
[23:10:52 CET] <durandal_1707> than just disable stuff you not gonna use
[23:11:05 CET] <TheRock> it does only play videos nothing else
[23:11:39 CET] <durandal_1707> ffmpeg decodes videos and audio only files...
[23:13:32 CET] <BtbN> So far I have yet to find a program that can properly rip some of my DVDs
[23:14:04 CET] <BtbN> They have a video commentary mode, basically like audio commentary, but with a video overlayed on the main video. And it's not burned into the main video, but an actual overlay.
[23:14:32 CET] <BtbN> Whatever program I tried, only a full iso dump of the disk preserved that
[23:19:18 CET] <durandal_1707> i never understood people who rip to lossy stuff
[23:20:31 CET] <TheRock> Thans durandal_1707, I'll have a look. The output binary is currently 23mb /w Qt (statically).
[23:20:45 CET] <TheRock> 9mb upx compressed
[23:20:48 CET] <BtbN> Well, you can quite signifficantly shrink a DVD by not using mpeg2, with mostly no noticable quality loss.
[23:21:26 CET] <durandal_1707> TheRock: make sure you enable stripping if you havent
[23:21:38 CET] <TheRock> But I'm a bit confused. I used -enable-static and w/o gpl prefix and h264
[23:21:47 CET] <TheRock> it still plays h264 well
[23:21:50 CET] <TheRock> is it using system codecs?
[23:22:14 CET] <durandal_1707> ffmpeg uses only its own codecs...
[23:23:04 CET] <TheRock> configure --extra-version=QtAV --disable-doc --disable-debug --enable-static --disable-shared --enable-runtime-cpudetect --enable-hwaccels --enable-libmfx --enable-avresample --disable-postproc --toolchain=msvc
[23:23:08 CET] <TheRock> i used this configure command to build it
[23:23:21 CET] <TheRock> it plays avi, mp4 (h264), etc.
[23:23:30 CET] <BtbN> Why do you enable avresample?
[23:23:44 CET] <TheRock> It was recommended by QtAV library
[23:24:23 CET] <TheRock> I thought i have to enable gpl licensing in configure + add h264 libraries
[23:24:31 CET] <TheRock> to play 264 encoded movies
[23:28:53 CET] <kepstin> TheRock: no, only to encode h264 video. The h264 decoder is builtin and LGPL.
[23:33:12 CET] <TheRock> ah okay
[23:43:00 CET] <furq> BtbN: i take it you tried makemkv and tcdemux
[23:43:38 CET] <furq> https://en.wikipedia.org/wiki/Jam_(TV_series)#Home_video
[23:43:43 CET] <furq> i still need to rip this fucker
[23:46:44 CET] <kepstin> BtbN: dvd doesn't support video overlays... that either must be subtitles or maybe done with angles?
[23:47:10 CET] <kepstin> angles on dvds are kinda weird, I don't really know any way to preserve them in another format :/
[23:47:24 CET] <furq> yeah it'll probably be done with angles
[23:48:06 CET] <furq> i've got a similar one where most players just play interleaved chunks with and without the video commentary overlay
[23:49:15 CET] <kepstin> Like, I *think* you could do this by encoding it into pieces in mkv, then making use of mkv's ordered chapters stuff to select the correct pieces, have one file that plays it with commentary, one without commentary
[23:49:44 CET] <furq> it's ultimately just two separate videos
[23:50:06 CET] <furq> if you really want them in the same file then there's some stuff you can do with mkv, yeah
[23:50:15 CET] <furq> but it won't playback properly on a lot of stuff
[23:50:30 CET] <kepstin> the worst I've seen was some anime dvds that used angles to switch between english vs. japanese credits on the opening video.
[23:50:56 CET] <kepstin> that was mostly a problem because dvd doesn't have enough bitrate to start with, and then they tried to fit the video in twice
[23:51:00 CET] <kepstin> so it looked awful
[23:54:17 CET] <furq> but yeah there are definitely tools that will demux the angles separately
[23:54:21 CET] <furq> if that was what you were asking
[23:54:49 CET] <furq> tccat and pgcdemux will both do it
[00:00:00 CET] --- Thu Nov 23 2017


More information about the Ffmpeg-devel-irc mailing list