[Ffmpeg-devel-irc] ffmpeg.log.20180117
burek
burek021 at gmail.com
Thu Jan 18 03:05:01 EET 2018
[00:59:44 CET] <cemil> Hi all; looking for some assistance with a really funky file format. Original file is in an unknown MPEG-2 container. At present it can only be played out & decoded through a Pinnacle Targa 3200 hardware card (at 1x speed). We've got a lot of these files and are trying to transcode them in an easier fashion. Long story short, ffplay will try to play the file, semi-successfully.
[01:00:21 CET] <cemil> ffprobe reports: https://pastebin.com/xiLPzzuG
[01:01:04 CET] <cemil> GOP is 126, if that helps, beyond that I don't have a ton of info. I do have the final decoded file - but it's been out through Pinnacle card and re-ingested, so it's not a direct transcode. Thoughts?
[01:02:00 CET] <cemil> One other bit of info, each content file comes with a ".AWI" file attached - small file (377kb) of unknown origin/type. Not sure if relevant.
[01:02:21 CET] <cemil> Any help greatly appreciated. Thanks.
[02:23:23 CET] <SilenceDogood> Hey there folks
[02:23:46 CET] <SilenceDogood> I'm trying to create a 3D edition of Dark Side of the Rainbow
[02:25:11 CET] <SilenceDogood> That means I'm trying to combine the "Wizard of Oz 3-D" bluray with the Dark Side of the Moon 2011 immersion edition bluray surround sound mix.
[02:27:03 CET] <SilenceDogood> It's fairly easy to map the video stream from the one and the audio stream from the other together onto a new file, but I want to move the audio over so that it syncs properly
[02:27:08 CET] <SilenceDogood> Currently it's about 12 seconds fast.
[02:27:18 CET] <SilenceDogood> Although that's just a ballpark estimate
[02:27:35 CET] <SilenceDogood> Here's my command: ffmpeg -i oz.mkv -i 00014.m2ts -map 0:0 -map 1:1 -vcodec copy -metadata:s:v:0 stereo_mode=1 -ss 29:00 -t 15 floyd.mkv
[02:28:22 CET] <SilenceDogood> 00014.m2ts is from the pink floyd DVD and oz.mkv is the Wizard of Oz
[02:29:39 CET] <SilenceDogood> oops I meant bluray
[02:29:46 CET] <SilenceDogood> hahaha dvd. thats old now
[02:30:17 CET] <SilenceDogood> How could I make the 1:1 mapping to be moved over 12 seconds?
[02:30:41 CET] <SilenceDogood> oh, the ss and t are just to test. that's where I got the idea that it's 12 seconds off
[02:31:26 CET] <durandal_1707> positive or negative sync needed?
[02:34:12 CET] <SilenceDogood> durandal_1707 the audio is approximately 12 seconds ahead of the video
[02:34:20 CET] <SilenceDogood> inserting 12 seconds of silence to the beginning would probably do it
[02:34:33 CET] <SilenceDogood> (I'd want to test to get a more precise synchronization)
[02:36:29 CET] <durandal_1707> if you can transcode just use adelay=12|12|12|12|.. audio filter
[02:36:57 CET] <durandal_1707> actually it should be 12000 instead
[02:37:31 CET] <SilenceDogood> what are all those pipes ?
[02:37:39 CET] <SilenceDogood> 12|12|12|12| ???
[02:38:06 CET] <SilenceDogood> Also, I probably ought to transcode because the audio source is ridiculously huge
[02:38:08 CET] <durandal_1707> channel separation
[02:38:13 CET] <SilenceDogood> ohhhh right
[02:38:22 CET] <SilenceDogood> well I obviously want all six channels the same
[02:38:41 CET] <durandal_1707> it specify duration in milliseconds
[02:39:19 CET] <SilenceDogood> so for six channels, it would be async=12000|12000|12000|12000|12000|12000 right?
[02:40:45 CET] <durandal_1707> yes
[02:40:49 CET] <SilenceDogood> suprise surprise, "'12000' is not recognized as an internal or external command, operable program or batch file."
[02:41:07 CET] <durandal_1707> iuse "
[02:41:22 CET] <durandal_1707> its adelay and ot async
[02:41:24 CET] <SilenceDogood> wait, shouldn't this be inside some kinda filter related syntax
[02:41:56 CET] <durandal_1707> -af "adelay=..."
[02:42:08 CET] <SilenceDogood> oh right, thanks
[02:42:56 CET] <SilenceDogood> does transcoding mean it can't skip to the timestamp that I specified quickly ?
[02:43:27 CET] <durandal_1707> what!?
[02:43:35 CET] <SilenceDogood> my command currently is: ffmpeg -i oz.mkv -i 00014.m2ts -map 0:0 -map 1:1 -vcodec copy -af "adelay=12000|12000|12000|12000|12000|12000" -metadata:s:v:0 stereo_mode=1 -ss 29:00 -t 15 floyd.mkv
[02:43:50 CET] <SilenceDogood> There's a spot 29 minutes in where it's easy to see whether it's synced or not
[02:44:17 CET] <SilenceDogood> The witch appears when the band sings "black"-- I have a non-3d version which is synced correctly to compare against
[02:44:37 CET] <durandal_1707> ah, transcoding is encoding
[02:45:27 CET] <SilenceDogood> actually never mind. it seems to have worked
[02:45:49 CET] <SilenceDogood> could you maybe give me some advice as to what my target format should be?
[02:46:00 CET] <SilenceDogood> for the audio I mean
[02:46:21 CET] <durandal_1707> depends what you need
[02:47:46 CET] <SilenceDogood> My target platform is virtual reality headsets like for phones, so I really need the final file to be something that could realistically fit on a phone
[02:48:06 CET] <SilenceDogood> and play in Skybox VR player or another similar 3D video player
[02:48:35 CET] <SilenceDogood> I believe those have implemented virtual surround sound
[02:48:49 CET] <SilenceDogood> although information about it online is scarce
[02:49:54 CET] <durandal_1707> look what format it supports
[02:52:23 CET] <SilenceDogood> They don't tell you. That's what drives me nuts about all this
[02:52:34 CET] <SilenceDogood> 3D audio/video support is a crazy wild west
[02:52:55 CET] <SilenceDogood> Or if they do tell you, I can't find it.
[02:54:24 CET] <durandal_1707> so skybox vr player have no such info?
[02:56:40 CET] <SilenceDogood> nope
[02:57:34 CET] <SilenceDogood> Oculus's standards just say, "if it's stereo, it had better be at least 128kbps for us to feature it on oculus video"
[02:57:52 CET] <SilenceDogood> So, when official sources don't tell us, let's see what the pirates do
[02:58:15 CET] <SilenceDogood> Pirate Wizard of Oz 3D encoded the audio as "DTS 5.1 Ch 1510 kbps"
[02:58:29 CET] <SilenceDogood> That sound reasonable?
[02:58:59 CET] <durandal_1707> isnt that original format?
[02:59:09 CET] <furq> yeah that'll be straight off the disc
[02:59:16 CET] <furq> for phones you presumably just want aac
[03:00:22 CET] <SilenceDogood> furq, I'm trying to preserve the surround sound mix though, because VR players will have virtual surround sound (I think?)
[03:00:33 CET] <furq> aac supports 5.1
[03:00:35 CET] <SilenceDogood> meaning it should dynamically adjust the mix as you turn your head
[03:00:41 CET] <SilenceDogood> oh ok
[03:00:48 CET] <SilenceDogood> so furq what would the command for that look like
[03:00:59 CET] <furq> -c:a aac
[03:01:05 CET] <furq> it should preserve the input channel layout
[03:01:25 CET] <SilenceDogood> furq should I be giving it some number for bitrate or something?
[03:02:06 CET] <SilenceDogood> also, I don't want it to be encoding twice (once for filter, once for aac) can I make sure to avoid that somehow?
[03:02:40 CET] <durandal_1707> filter operates on uncompressed audio
[03:02:44 CET] <SilenceDogood> OK thanks
[03:03:10 CET] <furq> it'll pick a sensible default for the channel layout
[03:03:13 CET] <SilenceDogood> Another question: can I loop the audio
[03:03:20 CET] <furq> looks like 320kbps in this case
[03:03:52 CET] <furq> you can give it more if you really want
[03:04:05 CET] <SilenceDogood> 320kbps mp3s sound fine
[03:04:15 CET] <SilenceDogood> but I am not sure what I'm doing with surround sound
[03:04:53 CET] <SilenceDogood> Also, can I get it to loop the audio, but stop at the end of the video?
[03:07:49 CET] <SilenceDogood> Currently, my command is: ffmpeg -i oz.mkv -i 00014.m2ts -map 0:0 -map 1:1 -vcodec copy -af "adelay=6000|6000|6000|6000|6000|6000" -c:a aac -metadata:s:v:0 stereo_mode=1 -ss 29:00 -t 15 floyd.mkv
[03:09:10 CET] <SilenceDogood> I'd like to make the audio from 00014.m2ts repeat until oz.mkv runs out of video, then stop so that the resulting file is the same length as oz.mkv (after I take out the -ss and -t of course)
[03:10:43 CET] <SilenceDogood> Actually, maybe what I should do is run two different ffmpeg commands. One to prepare the audio into some kind of temporary container file, and one to put the audio and video streams together
[03:11:56 CET] <SilenceDogood> furq would that be the way to do it? :)
[03:15:47 CET] <durandal_1707> to loop there is another filter, but better use apad filter to add silence
[03:16:10 CET] <SilenceDogood> which silence?
[03:16:20 CET] <SilenceDogood> The silence at the beginning?
[03:16:30 CET] <durandal_1707> audio silence at end
[03:16:41 CET] <durandal_1707> thats do apad filter
[03:16:42 CET] <SilenceDogood> I don't want audio silence at end
[03:16:58 CET] <SilenceDogood> I want it to just stop no matter where the audio happens to be
[03:17:04 CET] <SilenceDogood> when the video stops, the audio stops
[03:17:25 CET] <SilenceDogood> just cut off and throw away whatever's left
[03:18:20 CET] <SilenceDogood> So to be clear, the audio portion needs to be: "six seconds of silence + Dark side of the moon + Dark side of the moon again + Dark side of the moon up until the moment the video ceases, then throw out the rest"
[03:18:36 CET] <SilenceDogood> the album repeats about two and a half times as I recall
[03:18:56 CET] <SilenceDogood> and ends on "Home, home again" as Dorithy is back in Kansas
[03:20:29 CET] <SilenceDogood> durandal_1707, based on that, I don't think I need a pad filter ? unless I'm misunderstanding how those work?
[03:21:37 CET] <SilenceDogood> The wiki suggests what I probably need to say is something like this: for i in {1..3}; do printf "file '%s'\n" 00014.m2ts >> mylist.txt; done; ffmpeg -f concat -i mylist.txt -c:a aac floyd.aac
[03:21:49 CET] <SilenceDogood> Does that look right?
[03:22:41 CET] <durandal_1707> yees
[03:24:38 CET] <SilenceDogood> OK but what about cutting it off at the correct length?
[03:24:59 CET] <SilenceDogood> Should I maybe grab that length from oz.mkv and put it in as at -t or something?
[03:26:56 CET] <SilenceDogood> Guess I'm going to start for i in {1..3}; do printf "file '%s'\n" 00014.m2ts >> mylist.txt; done; ffmpeg -f concat -i mylist.txt -c:a aac -t 1:41:49 floyd.aac
[03:49:45 CET] <SilenceDogood> I'd like to know how to trim this properly though. I don't want to have leftover data at the end
[03:59:45 CET] <SilenceDogood> I decided to encode to 24-bit FLAC when looping the audio, then to lossy aac in the final step
[04:00:14 CET] <SilenceDogood> I may end up with six seconds of silence on the end, which is annoying
[04:00:33 CET] <kepstin> if you have a long audio and want to cut it to match the video, just use the "-shortest" option and let ffmpeg handle it
[04:00:47 CET] <SilenceDogood> Awesome. Thank you so much kepstin
[04:04:42 CET] <SilenceDogood> I'm going to want to add a bunch more stuff like preserving the subtitles, and adding the original Wizard of Oz audio back in as a second track (if it'll fit)
[04:05:09 CET] <SilenceDogood> but I think I have enough for an initial test run
[04:32:35 CET] <SilenceDogood> oh crap
[04:32:45 CET] <SilenceDogood> The 2011 immersion edition of Dark Side of the Moon changed the length
[04:33:10 CET] <SilenceDogood> This means that the remastered album does not loop at the same length as the old versions
[04:33:31 CET] <SilenceDogood> or at least the bluray stream isn't the same length as the old CD release
[04:33:40 CET] <SilenceDogood> oh well, at least the first time through seems to be in sync
[04:33:50 CET] <SilenceDogood> I might fix the rest of this crap another da
[04:33:52 CET] <SilenceDogood> *another day
[05:00:34 CET] <SilenceDogood> durandal_1707 and furq: Thanks so much for your help guys. I've watched the first third of the first playthrough and everything lines up perfectly like it's supposed to so far. This is working great!
[05:01:02 CET] <SilenceDogood> The second and third playthroughs are out of sync and will require some padding to get them in sync
[05:01:10 CET] <SilenceDogood> but that should be doable
[05:01:53 CET] <SilenceDogood> I'm gonna wait until my actual blu ray comes in the mail tho. I'm using a pirate source (naughty naughty) but I've ordered the bluray to come in the mail and I'll run this for real when it gets here, with subtitles and everything
[05:03:06 CET] <SilenceDogood> but yeah, Dark Side of the Rainbow is just as great as ever in with the Wizard of Oz in 3D and the 2011 5.1 remaster of Pink Floyd
[06:36:01 CET] <TarGari1> Hi,
[06:36:12 CET] <TarGari1> to day i will compile ffpeg with msys2
[06:36:14 CET] <TarGari1> x64
[06:36:47 CET] <TarGari1> thi is my command line to configure
[06:36:49 CET] <TarGari1> PKG_CONFIG_PATH="/usr/local/x86_64-w64-mingw32/lib/pkgconfig"
[06:36:51 CET] <TarGari1> ./configure --prefix=/usr/local/x86_64-w64-mingw32 --enable-gpl --enable-nonfree --enable-w32threads --enable-libx264 --enable-libfdk_aac --arch=x86_64 --enable-static --disable-shared --disable-doc --disable-ffplay --disable-ffprobe --cross-prefix=/mingw64/bin/x86_64-w64-mingw32- --target-os=mingw32 --extra-cflags='-I/usr/local/x86_64-w64-mingw32/include' --extra-ldflags='-L/usr/local/x86_64-w64-
[06:36:53 CET] <TarGari1> mingw32/lib -static'
[06:37:45 CET] <TarGari1> but i have always
[06:37:47 CET] <TarGari1> C compiler /mingw64/bin/x86_64-w64-mingw32-gcc
[06:37:49 CET] <TarGari1> C library mingw64
[06:37:51 CET] <TarGari1> host C compiler gcc
[06:37:53 CET] <TarGari1> host C library mingw64
[06:37:55 CET] <TarGari1> ARCH x86 (generic)
[06:38:09 CET] <TarGari1> ARC x86 (generic) and not x86_64
[06:38:14 CET] <TarGari1> ?!
[06:38:26 CET] <TarGari1> how to compile a x64 version of ffmpeg please ?
[06:39:17 CET] <TarGari1> what's wrong in my commandline
[06:39:18 CET] <TarGari1> ?
[07:05:41 CET] <buu_> Uh, help: http://paste.debian.net/plain/1005613
[07:05:45 CET] <buu_> Where does that error come from?
[07:06:01 CET] <buu_> ok
[07:06:04 CET] <buu_> never mind, I'm dumb
[09:21:14 CET] <JoshX> kepstin: sorry for the late response, going to try this, thanks!
[11:26:10 CET] <tommy``> guys hello, i'm using this command ffmpeg -i file.mkv -vf blackdetect=d=2:pix_th=0.00 -f null NUL to detect black scene on a video, is correct?
[13:19:03 CET] <relaxed> tommy``: yes, that's the example from the man page
[13:25:56 CET] <tommy``> yes i've changed d=2 because didn't detect black screen, so i used d=0.5
[13:26:29 CET] <tommy``> d=0,5 means "greater than" 0,5 sec right?
[13:28:03 CET] <relaxed> equal to or greater than
[13:28:10 CET] <tommy``> ok
[13:28:25 CET] <tommy``> i saw that there is blackframe too, but i didn't find any example
[15:57:08 CET] <jya> with ffplay, can I specify the audio decoder to use ? in particular I'd like to force the use of CoreAudio AAC on mac
[16:02:21 CET] <teratorn> jya: it accepts a lot of arguments just like ffmpeg, so I think the answer is yes
[17:06:29 CET] <huge_ddddd> I've had to rotate a video a ltitle, leaving me with two black triangles on top right and bottom left where the video has been cropped. Is there a way I can fill these sections in with a blur or so with ffmpeg?
[17:07:00 CET] <huge_ddddd> I was thinking some effect similar to how these vertical video to landscape format add blur on the sides.
[17:10:22 CET] <Nacht> huge_ddddd: I recon you can take the original movie, blur it, and then take it again, and rotate it, then use overlay
[17:11:15 CET] <huge_ddddd> Nacht: that's a great idea, thanks!
[17:11:48 CET] <huge_ddddd> I'm quite a noob with ffmpeg, but is applying an overlay _just_ to the black parts of a video easilly done?
[17:13:42 CET] <durandal_1707> yes, if you know right color for padding
[17:23:12 CET] <Nacht> I'm assuming the black parts are those where there is no video. But if you're still in the filter stage they are transparent. So if you blur it, and the overlay the tilted video above it, you would see the blurred video underneath it. So it would only show on the parts where you had no video. e.g. the black parts
[17:34:47 CET] <huge_ddddd> Excellent, thanks a bunch, i'll give a try
[18:06:29 CET] <jya> teratorn: thanks. I found my bug.
[19:47:28 CET] <effmar> ffmpeg
[20:26:23 CET] <teratorn> any good commands to generate test audio? like a changing tone?
[20:35:37 CET] <DHE> teratorn: https://ffmpeg.org/ffmpeg-filters.html#Audio-Sources
[20:37:31 CET] <teratorn> cool
[20:39:18 CET] <lyncher> hi. yesterday I was trying to add A53 CC data to a H264 stream with libavcodec
[20:39:40 CET] <lyncher> and I managed to do it using transcode.c
[20:40:02 CET] <lyncher> but that is far from ideal because a video encoding is being made
[20:40:24 CET] <lyncher> someone gave the suggestion to use a bsf to do it
[20:40:31 CET] <lyncher> without reencoding the video stream
[20:41:07 CET] <JEEB> which you would have to create yourself of course since there currently is no H.264 or HEVC BSF for that
[20:41:16 CET] <lyncher> from the current available bsfs I think that h264_metadata would be a good starting point
[20:41:29 CET] <JEEB> possibly
[20:41:32 CET] <foua> I'm in the process of slicing a MP3 file to a very fine-granular level (end - start < 1 second). However, when I inspect the output mp3 of the command and compare the output to equivalent in Audacity for example, they differ quite a lot (where Audacity sound more accurate). The command I use is: ffmpeg -i file.mp3 -ss s1 -to s2 output.wav. Is there something obvious I'm missing?
[20:41:43 CET] <lyncher> I've the git head.... but I can't find the source for that filter.....
[20:42:15 CET] <JEEB> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/h264_metadata_bsf.c;h=ada40a57c7138ab7194e03b6ccd290ead0f7f08c;hb=HEAD
[20:42:24 CET] <JEEB> libavcodec/h264_metadata_bsf.c
[20:43:33 CET] <furq> foua: if you want a sample-perfect cut then try the atrim filter
[20:43:35 CET] <furq> !filter atrim
[20:43:35 CET] <nfobot> furq: http://ffmpeg.org/ffmpeg-filters.html#atrim
[20:44:13 CET] <lyncher> weird... I really don't have that source here.... thanks
[20:44:35 CET] <lyncher> it seems that in 2012 someone had the same issue: http://libav-users.943685.n4.nabble.com/Add-MPEG-2-user-data-or-H-264-SEI-metadata-while-remuxing-td4530217.html
[20:46:06 CET] <furq> so uh
[20:46:18 CET] <foua> furq: I see --- thanks a lot, I will have a look! :-)
[20:46:19 CET] <furq> the net neutrality popup is still showing up on ffmpeg.org
[20:46:36 CET] <JEEB> yes, someone please make a patch on the site repo :|
[20:46:40 CET] <JEEB> and post on ffmpeg-devel
[20:47:03 CET] <furq> it still shows up on zeranoe too, in case he can see this
[20:47:20 CET] <furq> or it might have been relaxed's site, i forget now
[20:47:44 CET] <lyncher> JEEB: my repo was pointing to tag 3.
[20:48:00 CET] <lyncher> JEEB: my repo was pointing to tag 3.4.1.... switched to HEAD and now I got that file. thanks
[20:48:05 CET] <JEEB> well you picked that at some point, the default branch is master
[20:48:13 CET] <JEEB> but yea, enjoy
[20:49:42 CET] <lyncher> the content of the SEI is well defined.... I'm trying to figure out what is the correct insertion point in the h264 stream
[20:50:18 CET] <lyncher> according to that post is after the last SEI (easy to identify).... but If I have no previous SEI I've to figure that out
[20:57:02 CET] <painy> hello
[20:57:49 CET] <painy> is there any issue splitting a vp9 webm with ffmpeg? i see if I split some videos, they don't play properly in vlc (it freezes for a few seconds before playing properly) or in ffplay (it plays slow motion before resuming normally)
[21:00:07 CET] <painy> here's the command I use:
[21:00:11 CET] <painy> ffmpeg -i dvgrab-012.webm -codec copy -ss 00:32.69 012.02.webm
[21:00:48 CET] <painy> if I try playing 012.02.webm, it does what I said
[21:00:57 CET] <BtbN> exact splitting without re-encoding is impossible
[21:01:02 CET] <BtbN> it will either not work or result in broken files
[21:02:05 CET] <painy> i see, thanks
[21:02:43 CET] <BtbN> I would expect it to use the nearest keyframe though
[21:02:52 CET] <BtbN> instead of actually breaking files
[21:04:23 CET] <painy> such is life
[21:07:02 CET] <furq> afaik it cuts the audio at the exact point and then cuts the video at the next keyframe
[21:07:06 CET] <furq> hence the pause at the start
[22:08:53 CET] <foua> I realise that this might not be a *perfect* fit for #ffmpeg, but I was here previously asking about inaccurate trimming in an mp3 file (even with atrim filter). However, transcoding the input file to a .wav and running the same command gives an accurate representation. Is there something I can do here in order to avoid transcoding, or am I stuck with it?
[22:10:43 CET] <BtbN> you can only ever cut on full frames without transcoding
[22:12:40 CET] <foua> Thanks BtbN --- I'll hang on to the transcoding then :-)
[22:15:10 CET] <IZh> Hi. I have a short 5-second audio file in *.3gp format (AAC codec) that stutters on (most of?) Linuxes but plays well on Androids, Macs and Windows. Not sure whether it is a right place to ask, but how to find a guilty part?
[22:15:17 CET] <IZh> The file has reproducible stutter on about 1 second from the start.
[22:18:35 CET] <alexpigment> IZh: out of curiosity, have you tried just doing a copy to another container (e.g. m4a)?
[22:19:00 CET] <alexpigment> e.g. ffmpeg -i [infile] -c:a copy [outfile.m4a]
[22:24:28 CET] <IZh> alexpigment: No.
[22:24:48 CET] <alexpigment> ok
[22:25:04 CET] <IZh> alexpigment: Sent you a link to the file.
[22:25:38 CET] <IZh> Stuttering on 1-st second sounds strange like it tries to replay the already played part again.
[22:26:48 CET] <IZh> The file itself is small. It's an alarm sound of Sony Ericsson K790i.
[22:27:35 CET] <IZh> It's my favourite morning alarm sound. Tried to copy it on another device (under Linux) and found that Linuxes can't play it well. Had to convert to MP3 for now.
[22:27:58 CET] <alexpigment> works fine over here
[22:28:08 CET] <alexpigment> then again, i don't have a linux box to test at the moment
[22:28:27 CET] <alexpigment> i guess earlier when i asked a question, it was more a prescriptive thing than just simply a question
[22:28:38 CET] <alexpigment> can you try the ffmpeg command above?
[22:29:07 CET] <IZh> alexpigment: Not right not (AFK) but would try tomorrow.
[22:29:11 CET] <alexpigment> that will take the native aac stream and put it in a container that's more common outside of mobile devices
[22:29:14 CET] <alexpigment> ok
[22:29:15 CET] <sfan5> "Linux can't play it well" is fairly inaccurate
[22:29:24 CET] <sfan5> what matters is the software used for playback, not the OS
[22:29:36 CET] <alexpigment> i would also agree with the above
[22:29:56 CET] <alexpigment> having said that, i would bet money on something being able to play an m4a file correctly than i would a 3gp audio file
[22:29:56 CET] <IZh> sfan5: Agreed. Tried on few mobile devices with Sailfish OS and one Linux desktop.
[22:30:18 CET] <sfan5> and with which player? VLC?
[22:30:18 CET] <IZh> And got the same stuttering.
[22:31:17 CET] <alexpigment> the other thing to keep in mind is that this is he-aacv2
[22:31:34 CET] <alexpigment> which is quite a bit less common than aac-lc
[22:31:53 CET] <alexpigment> so there's the potential the same thing would happen in an m4a container
[22:32:14 CET] <alexpigment> but it's certainly not complicated enough of a format that any relatively modern system can't play it
[22:32:35 CET] <IZh> It was tested on Totem player on Linux.
[22:33:21 CET] <kerio> i haven't heard that name in a looooooong time
[22:34:06 CET] <b0bby__> hello
[22:36:09 CET] <IZh> I could test it tomorrow with different players on few distros.
[22:36:20 CET] <alexpigment> i think totem is just what is now called "Videos"
[22:36:26 CET] <alexpigment> and is the default player for ubuntu etc
[22:37:09 CET] <sfan5> it uses gstreamer IIRC
[22:37:13 CET] <IZh> Yes. My colleague simply clicked on the file.
[22:37:15 CET] <sfan5> trying something ffmpeg-based would be a good idea
[22:37:16 CET] <b0bby__> I have a programming problem and have no idea where to start. The project is in c++. I need to take a bunch of videos(different formats, frame rates, and audio bitrates) and combine them into one 16:9 video(with black bars if the video can't stretch side ways(similar to how video players do it)) with the .mp4 format. Does ffmpeg have all the things I need for this and where do I start?
[22:37:50 CET] <sfan5> b0bby__: it does and you probably want to start by looking at the doc/examples/
[22:38:08 CET] <sfan5> though you would not even *need* C++ for this
[22:38:29 CET] <b0bby__> sfan5: I know
[22:38:52 CET] <b0bby__> sfan5: any idea what which files to look at in examples
[22:39:31 CET] <sfan5> e.g. transcoding.c
[22:39:45 CET] <sfan5> maybe filter_video.c and some others
[22:40:41 CET] <alexpigment> b0bby__: concat is the main thing you're going to need, I believe: https://trac.ffmpeg.org/wiki/Concatenate . specifically the second about the Concat Filter
[22:40:55 CET] <alexpigment> next, you'll need to know about padding
[22:41:24 CET] <alexpigment> https://ffmpeg.org/ffmpeg-filters.html#pad-1
[22:41:57 CET] <alexpigment> the audio stuff a bit simpler. you just specify a desired output format after you've used the concat filter
[22:47:52 CET] <b0bby__> alexpigment: I'm working in c++
[23:00:26 CET] <b0bby__> Any good tutorials for ffmpeg programming? Trying to read through the examples but I'm having trouble.
[23:02:10 CET] <JEEB> not that I know. I mostly utilized the examples and the doxygen documentation/headers (and just plain asking people) https://ffmpeg.org/doxygen/trunk/group__lavf__decoding.html
[23:02:44 CET] <JEEB> the "trunk" documentation is the latest stuff
[23:17:28 CET] <fdemo> Tell me please. I'm trying to transcode the video, but on some files I get an error when opening the codec. avcodec_open2(enc_ctx, encoder, opt) = -1
[23:17:37 CET] <fdemo> I took this line from the example "enc_ctx.time_base := av_inv_q(dec_ctx.framerate);"
[23:17:47 CET] <fdemo> After this line is executed, the values of timebase set:
[23:17:55 CET] <fdemo> enc_ctx.time_base.num = 417083
[23:18:04 CET] <fdemo> enc_ctx.time_base.den = 10000000
[23:19:19 CET] <b0bby__> Ok. been reading the examples, this is my idea so far. DecodeVideo1->getframe->applystretchingAndBlackLines->(lower frame rate some how)->write frame to file through encode, then continue to next video.
[23:19:52 CET] <b0bby__> Then audio would be the same except I would have to change its bitrate
[23:20:32 CET] <JEEB> I hope you're using this API for decoding and encoding (the feed/receive ones)
[23:20:35 CET] <JEEB> https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[23:20:45 CET] <JEEB> *send/receive
[23:26:12 CET] <aokfire> Hello all. I just had a quick question. I have a source that is interlaced. Source is 29.97fps, so output should be too. But there is a duplicate frame every 5th
[23:26:36 CET] <aokfire> do I need to use yadif AND decimate? They are not mutual, eg. with specific yadif setting I can remove duplicates?
[23:26:46 CET] <aokfire> thank you
[23:26:47 CET] <JEEB> decimation required so most likely you also want field matching
[23:27:04 CET] <aokfire> right now I just have: yadif
[23:27:08 CET] <aokfire> no chosen specifics.
[23:27:28 CET] <aokfire> -vf "yadif, crop"
[23:27:34 CET] <aokfire> Would i decimate before or after yadif
[23:27:36 CET] <JEEB> yadif is a deinterlacer, and I would check if your pictures are instead consisting of two fields having to matched VS completely separate pictures in each field
[23:27:45 CET] <aokfire> ah
[23:28:01 CET] <JEEB> yadif is what you need when field A has picture A, and field B has picture B - so you can't get an image by just field matching two
[23:28:21 CET] <JEEB> this is what you use before decimation in 99% of all cases https://www.ffmpeg.org/ffmpeg-all.html#fieldmatch
[23:28:38 CET] <aokfire> ah inverse telecine
[23:28:39 CET] <JEEB> because in most cases you have pictures put into two fields that have to be matched
[23:28:55 CET] <aokfire> i was using yadif previously on a source that was also 29.97, but the actual content was 60fps
[23:29:13 CET] <JEEB> 60 fields per second and each field is its own thing
[23:29:15 CET] <JEEB> true interlacing
[23:29:20 CET] <JEEB> which is where deinterlacing comes up :)
[23:29:24 CET] <aokfire> ya
[23:29:26 CET] <aokfire> so that's fine
[23:29:33 CET] <aokfire> but this source is not 23.97, nor 60
[23:29:38 CET] <aokfire> definitely 30fps
[23:30:24 CET] <JEEB> well after decimation it would become 24/1.001 from 30/1.001 :P
[23:30:36 CET] <kepstin> it sounds like your sources was 24000/1001 frames per second, telecined to 60000/1001 fields per second, stored as 30000/1001 frames per second.
[23:31:05 CET] <JEEB> well it could be coded as separate fields or frames, depends on how interlacism is handled
[23:31:34 CET] <JEEB> but generally you get them decoded with two fields interleaved
[23:31:40 CET] <aokfire> ok uhm
[23:31:43 CET] <kepstin> yeah, but by the time it's in the ffmpeg filter chain, you'll usually have combed frames.
[23:31:46 CET] <aokfire> I'm looking at this one I'm working on now
[23:31:49 CET] <aokfire> the image is like
[23:31:54 CET] <aokfire> when there's movement, there is a shadow
[23:31:57 CET] <aokfire> er ghost
[23:32:00 CET] <aokfire> not ghosting persay but
[23:32:14 CET] <JEEB> kepstin: jpeg2000 and hevc are the exceptions btw
[23:32:32 CET] <JEEB> which output the separate pictures and can't be fed into the filters because everything expects them to be combed together
[23:32:35 CET] <JEEB> lul
[23:34:16 CET] <aokfire> so what should I Use JEEB... just a bit confused
[23:34:34 CET] <JEEB> if it looks good after fieldmatch+decimate then use that
[23:34:50 CET] <aokfire> "The decimate filter currently only works for constant frame rate input. If your input has mixed telecined (30fps) "
[23:34:55 CET] <aokfire> it's definitely 29.97 or 30fps
[23:35:04 CET] <JEEB> don't worry about that :P
[23:35:07 CET] <aokfire> ok
[23:35:14 CET] <aokfire> sooo not yadif.
[23:35:24 CET] <JEEB> otherwise you'll have to start looking into getting down n' dirty if it's mixed content in 60 fields interlaced :P
[23:35:28 CET] <kepstin> aokfire: telecined (2:3) video is a way of storing 24fps video into 60 fields per second (30fps) video.
[23:35:29 CET] <aokfire> nah
[23:35:34 CET] <aokfire> it's all 29.97
[23:35:34 CET] <JEEB> (as in, if fieldmatch+decimate doesn't look good)
[23:35:37 CET] <kepstin> so inverse telecine gives you 24fps back
[23:35:40 CET] <aokfire> hm
[23:35:42 CET] <aokfire> well here's th thing
[23:35:48 CET] <aokfire> I forced ffmpeg using -r to 24000/1001
[23:35:52 CET] <aokfire> and used yadif. and it was too slow
[23:35:55 CET] <aokfire> audio desynced
[23:36:08 CET] <JEEB> aokfire: well the 60 fields per sec is the "container" you have now - the content within that can be whatever
[23:36:09 CET] <kepstin> aokfire: you used the -r input option, which is wrong.
[23:36:17 CET] <aokfire> oops
[23:36:21 CET] <JEEB> that what my "if it doesn't look good / down and dirty" comments meant :P
[23:36:39 CET] <JEEB> because handling mixed content properly in libavfilter is not fun
[23:36:51 CET] <kepstin> aokfire: and using the -r output option will probably drop the wrong frames, so don't do that either. The decimate filter detects the correct 'duplicate' frames to drop.
[23:36:58 CET] <aokfire> ok
[23:37:02 CET] <aokfire> so I want to use the decimate filter
[23:37:09 CET] <JEEB> fieldmatch, then decimate
[23:37:11 CET] <aokfire> ok
[23:37:16 CET] <aokfire> and this will deinterlace as well
[23:37:23 CET] <kepstin> no, it will undo the telecine
[23:37:27 CET] <aokfire> hrm
[23:37:39 CET] <JEEB> it will remove the interlacism, but deinterlacing is specifically handling actually interlaced content
[23:37:45 CET] <aokfire> so fieldmatch + decimate and then yadfi
[23:37:48 CET] <aokfire> yadif
[23:37:49 CET] <JEEB> no
[23:37:55 CET] <aokfire> sorry
[23:38:10 CET] <kepstin> fieldmatch will remove the combing by undoing the telecine, giving you back a progressive video
[23:38:18 CET] <JEEB> both IVTC (inverse telecine) and a deinterlacing filter will remove the interlacism, they are just to be applied for different content
[23:38:24 CET] <aokfire> ahhhh
[23:38:24 CET] <JEEB> as in, what is in that interlaced video
[23:38:25 CET] <kepstin> then decimate removes some duplicate frames that fieldmatch leaves as a side-effect.
[23:38:35 CET] <aokfire> got it
[23:38:48 CET] <aokfire> and kepstin using fieldmatch will output proper fps, which I'm guessing is 29.97?
[23:38:50 CET] <JEEB> and yes, many people call both deinterlacing since they get rid of interlacism
[23:39:02 CET] <JEEB> just field match will have the same rate
[23:39:04 CET] <JEEB> as the input
[23:39:14 CET] <aokfire> ah
[23:39:15 CET] <JEEB> since it literally just tries to match up fields in the interlaced video
[23:39:20 CET] <kepstin> aokfire: no, the correct output rate will be 24000/1001 (~24fps) progressive
[23:39:22 CET] <JEEB> and create progressive frames
[23:39:26 CET] <JEEB> kepstin: that is after decimation
[23:39:34 CET] <kepstin> er, yes, true, after decimation
[23:39:49 CET] <JEEB> aokfire: then you will still have your duplicates after field match, which is why if you have 1-2-3-4-4 kind of situation you apply decimate
[23:39:51 CET] <kepstin> I'm actually kind of annoyed that fieldmatch doesn't have builtin decimation, but that's another story :)
[23:40:10 CET] <JEEB> well it makes sense to separate them since there are sources which don't require decimation
[23:40:22 CET] <JEEB> and/or mixed sources. but handling them is a PITA anyways
[23:40:48 CET] <JEEB> avisynth had TFM and TDecimate separate as well, and vapoursynth has those steps separate as well
[23:41:07 CET] <aokfire> ah wow
[23:41:10 CET] <aokfire> lotta settings
[23:41:14 CET] <kepstin> anyways, aokfire - to understand what telecine does, go look at https://en.wikipedia.org/wiki/Telecine#2:3_pulldown
[23:41:29 CET] <JEEB> aokfire: I wouldn't be surprised if you could just apply the defaults and they'd work
[23:41:34 CET] <kepstin> it turns 4 progressive frames into 5 interlaced frames (10 fields)
[23:41:38 CET] <JEEB> they're there for tweaking and/or nonstandard things
[23:41:46 CET] <kepstin> so what we're doing now is undoing that to get the original 4 frames back.
[23:41:49 CET] <aokfire> -vf "fieldmatch, decimate, crop"
[23:41:51 CET] <aokfire> ?
[23:42:09 CET] <JEEB> yes, but generally you put some values in the crop
[23:42:15 CET] <aokfire> yeah there are values
[23:42:18 CET] <JEEB> ok
[23:42:23 CET] <aokfire> just making it basic to understand easily
[23:42:25 CET] <JEEB> I recommend making a quick test thing
[23:42:28 CET] <aokfire> yes
[23:42:30 CET] <aokfire> -t 30
[23:42:32 CET] <JEEB> use -ss and -t for it
[23:42:38 CET] <JEEB> ss for seeking into the content
[23:43:07 CET] <aokfire> I am thinking there might be as mentioned in that wiki, 24fps content with the 30fps
[23:43:10 CET] <aokfire> im not sure
[23:43:26 CET] <kepstin> keep in mind that to check the detelecine, you'll probably end up watching the whole video to see if there were any mismatched sections or mixed content (which will show up as appearing to still be interlaced)
[23:43:53 CET] <aokfire> [Parsed_fieldmatch_0 @ 0000000003b1fb00] Frame #248 at 8.27493 is still interlaced
[23:43:57 CET] <aokfire> or stuff like that?
[23:44:09 CET] <JEEB> that might be a false or something that will get decimated
[23:44:16 CET] <kepstin> aokfire: hmm, you really have to check the video to see.
[23:44:17 CET] <JEEB> with this stuff you really need to go by eye
[23:44:23 CET] <aokfire> aw man
[23:44:33 CET] <aokfire> maybe I should forget reencoding lol
[23:44:59 CET] <aokfire> ahh, many frames still interlaced
[23:45:01 CET] <kepstin> if you're getting a *lot* of messages like that, then the video content probably isn't telecined, or is mixed telecined and interlaced.
[23:45:15 CET] <aokfire> 12 now
[23:45:29 CET] <JEEB> well, that doesn't really say much
[23:45:44 CET] <aokfire> there are 12 messages claiming interlaced frames
[23:45:44 CET] <JEEB> it's all guesswork by the matching algorithm
[23:45:58 CET] <aokfire> like I said I think it's 29.97
[23:45:59 CET] <JEEB> and it could be either false positives or stuff that gets decimated
[23:46:10 CET] <JEEB> if it was that then you wouldn't have the duplicates
[23:46:15 CET] <aokfire> ah
[23:46:20 CET] <aokfire> yes makes sense
[23:46:32 CET] <JEEB> basically your input is 60/1.001 fields per second, yes
[23:46:40 CET] <JEEB> but what is INSIDE those fields (as content)
[23:46:42 CET] <aokfire> it's 29.97i
[23:46:42 CET] <JEEB> is what matters
[23:46:45 CET] <aokfire> yes
[23:47:18 CET] <JEEB> aokfire: the exact value is 30/1.001 "frames" per second, or just 60/1.001 fields per second :P
[23:47:37 CET] <aokfire> ahhh
[23:47:43 CET] <aokfire> and no more dupe frames, good
[23:47:55 CET] <kepstin> (29.97 is a rounded value, which is actually off be enough to sometimes cause desync issues with many-hour videos)
[23:50:35 CET] <JEEB> aokfire: and because the interlaced fields is just the "container" for whatever's in the content you can get stuff like telecined content with interlaced credits on top
[23:50:46 CET] <JEEB> at that point you just facepalm and use some fancy filters not in FFmpeg
[23:50:50 CET] <aokfire> aha
[23:51:04 CET] <aokfire> yeah not looking for something fancy/end all
[23:51:10 CET] <aokfire> I could just use AVS for that
[23:51:16 CET] <aokfire> Anyway I think you're right, it's 23.976
[23:51:33 CET] <kepstin> (24000/1001 - again, the decimal value is rounded)
[23:51:40 CET] <JEEB> well the "it has duplicates (1-2-3-4-4)" is a telltale sign of it :P
[23:51:51 CET] <JEEB> that at least some part of your content needs decimation
[23:52:02 CET] <aokfire> yes sorry
[23:52:04 CET] <aokfire> 24000/1001
[23:52:13 CET] <aokfire> I just use 23.976 as an easier to approach term
[23:52:20 CET] <aokfire> perhaps for those who are lurking in here and interested.
[23:52:34 CET] <kepstin> once people get really lazy, they just say 24, 30, and 60 :/
[23:52:35 CET] <aokfire> But yes, it is definitely 24000/1001. It doesn't "look" as fast as 30000/1001
[23:52:51 CET] <aokfire> ive seen native 29.97 content and this isn't it
[23:53:12 CET] <JEEB> it's really easy to check content in something like AvsPmod if you know avisynth :P
[23:53:17 CET] <kepstin> native progressive 30fps content is actually kinda rare.
[23:53:30 CET] <JEEB> separatefields+selecteven and see the preview
[23:53:31 CET] <kepstin> (30i - aka 60 fields per second - is common tho)
[23:53:38 CET] <JEEB> is it 1-2-3-4-4 or 1-2-3-4-5
[23:53:47 CET] <JEEB> then you remove the selecteven
[23:53:50 CET] <aokfire> yes
[23:53:56 CET] <aokfire> so I think I got it right now :)
[23:53:59 CET] <JEEB> and you see if the images consist of a single or multiple fields
[23:54:18 CET] <JEEB> (and in the worst case you filter in parts because the content switches)
[23:54:55 CET] <aokfire> yeah
[23:57:26 CET] <aokfire> well, samples look good
[23:57:53 CET] <aokfire> so I think it is all good :)
[23:58:02 CET] <aokfire> thanks for the help JEEB and kepstin
[23:58:05 CET] <JEEB> np
[00:00:00 CET] --- Thu Jan 18 2018
More information about the Ffmpeg-devel-irc
mailing list