[Ffmpeg-devel-irc] ffmpeg.log.20181216
burek
burek021 at gmail.com
Mon Dec 17 03:05:02 EET 2018
[00:00:21 CET] <Nosomy> Well apparently (for me) no has another lossy audio codec as good as Ogg Vorbis, it looks even lossless.
[00:00:36 CET] <Mavrik> ?
[00:02:10 CET] <kingsley> durandal_1707: Yes, I agree that nlmeans may be worth trying.
[01:01:02 CET] <kingsley> I'm happy to report that kdenlive->Add effect->enhancement->"Denoiser" appears to reduce graininess. I applied it after improving brightness and contrast with kdenlive->Add effect->color correction->"3 point balance".
[07:12:02 CET] <voltagex> what exactly does -absf aac_adtstoasc do? I've got one player that plays with bad audio without it, one player that won't play with it, and one player that plays perfectly with it
[07:14:43 CET] <voltagex> ah, that explains why my MP4 works better with it. Hah. Hope it's a lossless operation.
[10:20:53 CET] <kerio> ogg vorbis is kinda ass
[10:21:07 CET] <kerio> especially compared to modern codecs like opus
[10:22:38 CET] <cheapie> Well, yeah, Vorbis is kinda old :P
[15:17:38 CET] <getrat> No matter what I try, following instructions exactly, I cannot get ffmpeg to react in any way to my attempts to making it turn a .ts and .audio.ts file into a single file (.mp4 or .mkv or whatever it prefers). All it does is "just sits there". Literally. Zero output. No "work has begun" text or anything. It just... sits there.
[15:17:49 CET] <getrat> Example: "C:\Program Files\ffmpeg\ffmpeg.exe" -f concat -i file_list.txt -c copy out.mp4
[15:17:59 CET] <getrat> Opens a command prompt and then sits there. Forever.
[15:18:20 CET] <getrat> At the same time, the ffmpeg binary is not broken because it can be used for other things, and then it does output stuff.
[15:18:58 CET] <getrat> file_list.txt contains the two file names in quotes after the string "file " on each line.
[15:19:07 CET] <getrat> Single quotes.
[15:19:25 CET] <getrat> What is wrong?
[15:37:42 CET] <Blacker47> getrat, if you want to put video and audio to one file, then concat is really wrong (it appends second file on the end of first).
[16:24:06 CET] <getrat> Blacker47: Alright... So now I know what is wrong. What now?
[16:24:10 CET] <getrat> What is the actual solution?
[16:24:51 CET] <getrat> And even if it was wrong, it still makes no sense that it outputs nothing.
[16:28:50 CET] <Blacker47> getrat, if files only contain one video and one audio stream (and they are sync...) then this should work i think: "ffmpeg -i video.ts -i audio.ts -vcodec copy -acodec copy -shortest out.mkv"
[16:29:23 CET] <Blacker47> if some of files has more then one strem than you have to work with -map command.
[16:31:10 CET] <getrat> Well, as I said, it's just one .ts and one .audio.ts file.
[16:31:13 CET] <getrat> Trying your command now.
[16:32:03 CET] <SpeakerToMeat> Hello all, again :)
[16:32:19 CET] <SpeakerToMeat> is there any null codec? I want to convert from one format into nothing.
[16:32:51 CET] <Blacker47> just for merging files to mkv (if it is ok that it would be mkv) you also can use mkvtoolnix. it is a nice gui where you also can select what streams from what file you want in the output file.
[16:33:59 CET] <Blacker47> SpeakerToMeat, what should a 'null codec' be?
[16:34:44 CET] <SpeakerToMeat> One that produces nothing.
[16:35:08 CET] <furq> SpeakerToMeat: -f null
[16:35:14 CET] <getrat> Blacker47: Thanks. It seems to have worked. But it makes no sense, because the resulting file was barely larger at all than the video file, in spite of now having the audio part in it.
[16:35:30 CET] <Blacker47> then you wouldn't have any stream so just drop a stream.
[16:35:34 CET] <furq> no
[16:35:36 CET] <SpeakerToMeat> I'm veryfying discrete frames by runnign imagemagick's convert to null on each one, so each is loaded and if it loads, it's ok. I wanted to try and do the same in ffmpeg to see if it's more efficient (I know it is), and save the encode part of the process to save cpu time.
[16:35:52 CET] <furq> getrat: mpegts has about 5-10% overhead over mkv
[16:36:07 CET] <furq> so that probably swallowed up most of the size of the audio stream
[16:36:12 CET] <SpeakerToMeat> furq: Ok I'll try that. I need to provide an output file anyhow? I can try with /dev/null
[16:36:20 CET] <getrat> Video file = 1 988 320 kB. Audio file = 52 088 kB. Resulting (MKV) file = 1 988 416 kB.
[16:36:20 CET] <furq> SpeakerToMeat: just -f null -
[16:36:51 CET] <getrat> So somehow, MKV makes a 52 MB audio file into less than 100 kB?
[16:37:06 CET] <furq> yes
[16:37:13 CET] Action: getrat doesn't understand this.
[16:37:16 CET] <Blacker47> getrat, audio are in generall much much smaller than the video...
[16:37:16 CET] <SpeakerToMeat> furq: thanks
[16:37:26 CET] <getrat> Blacker47: Did you see what I just typed?
[16:37:31 CET] <furq> mpegts is about 5-10% bigger than mkv given the same streams
[16:38:03 CET] <getrat> Isn't it odd that the resulting file starts with "1 988...", just like the input video file?
[16:38:09 CET] <furq> does it work
[16:38:37 CET] <furq> if it works then it's just a coincidence
[16:39:39 CET] <getrat> furq: Are you talking to me?
[16:39:43 CET] <furq> yes
[16:41:07 CET] <getrat> I had a .ts video file of 1 988 320 kB, and an .audio.ts audio file of 52 088 kB. I ran Blacker47's magical command, and the resulting MKV file is: 1 988 416 kB. It works and plays with audio. The command was: "ffmpeg -i video.ts -i audio.ts -vcodec copy -acodec copy -shortest out.mkv"
[16:41:13 CET] <Blacker47> getrat, see what furq said and you can use something line mediainfo to see the streamsitzes for video and audio (for the mkv).
[16:41:31 CET] <getrat> 50 megs to 100 kB is not 5-10%...
[16:42:07 CET] <getrat> MKV must be very efficient for the video as well.
[16:42:19 CET] <getrat> And a bizarre coincidence that the numbers line up like that.
[16:42:47 CET] <furq> it's not 5-10% of the size of the audio
[16:42:58 CET] <furq> it'd be 5-10% of the combined size
[16:43:09 CET] <furq> i guess it's only 2.5% in this case but you get the idea
[16:44:01 CET] <Blacker47> getrat, in short: ts is not a raw format and had (as mkv too) overhead. this may be different. also mkv may be (some kind of zipped) additional compressed that may reduce slightly the size too. (not sure ffmpeg does that).
[16:44:14 CET] <furq> mkv does not do any kind of compression
[16:44:21 CET] <getrat> Tried with another identical set of files and it also becomes almost identical in size to the video file in spite of containing the audio... Again lining up with the first digits. Which freaks me out.
[16:44:24 CET] <furq> mpegts is a streaming format so it sends additional headers inband
[16:44:39 CET] <getrat> Hmm.
[16:45:18 CET] <Blacker47> getrat, maybe mediainfo can show you for the .ts files the really size or percent of the overhead.
[16:45:44 CET] <getrat> I get a creeping sensation on my back whenever something like this happens and I just don't understand why it's happening. I mean, I get the whole thing about different file formats having wildly different compression and efficiency, but the numbers seem too odd here.
[16:45:46 CET] <furq> the overhead is more or less video.ts + audio.ts - combined.mkv
[16:46:17 CET] <furq> also ffmpeg will show you the actual stream sizes when it's done muxing so you can just subtract those
[16:46:54 CET] <furq> getrat: like i said, if the video works then there's nothing to worry about
[16:46:57 CET] <furq> it's just a weird coincidence
[16:47:13 CET] <getrat> Two weird coincidences. :/
[16:47:26 CET] <getrat> But yes... I should... be happy with this...
[16:47:29 CET] <furq> well if all these files come from the same place then i'd expect them all to line up
[16:47:48 CET] <furq> because it's a product of the mpegts overhead rate and audio bitrate being about the same
[16:49:21 CET] <Blacker47> [16:44:14] <furq> mkv does not do any kind of compression <-- yes, i was a little wrong. mkv can have (zlib-) compressed subtitles but not additional compressed streams.
[16:50:46 CET] <Blacker47> getrat, you can also try different output container like mp4, ts or whatever and see what sizes it produce.
[16:50:55 CET] <getrat> I took a screenshot to perhaps better illustrate what puzzles me about the results: https://i.boring.host/KFHmR7f.png
[16:51:41 CET] <pink_mist> getrat: it's just because .ts is a shitty container and needs so many more bytes to represent the same things as mkv does
[16:51:55 CET] <pink_mist> there's nothing strange about it
[16:51:59 CET] <pink_mist> it's just that .ts is shit
[16:52:11 CET] <getrat> I tried with .mp4 just now and it ran much faster. The resulting file: 2 008 463 kB.
[16:52:21 CET] <getrat> pink_mist: Hmm.
[16:52:21 CET] <furq> it's not shit, it's designed for something else
[16:52:42 CET] <pink_mist> ok, let me put it like this then: it's shit for all my needs
[16:52:56 CET] <JEEB> I much prefer MPEG-TS to FLV as far as streaming goes
[16:53:04 CET] <JEEB> for standalone seekable files, sure
[16:53:09 CET] <JEEB> it's crap for that because it has no index
[16:53:35 CET] <JEEB> blu-ray for some reason then decided to utilize it, and stuck extra 4 byte timestamp after each 188 byte packet I think?
[16:54:39 CET] <getrat> In spite of this annoying mystery, thanks for helping me with the magical command. At least I can now watch this stuff.
[16:54:56 CET] <pink_mist> getrat: compare an mkv of just the video stream to just the .ts video stream
[16:55:26 CET] <getrat> By the way, nothing pisses me off more than when the audio is desynced or "drifts" while playing a video file. I can't even understand why those things happen, but it's been a frequent frustration both when trying to play back video files and while editing video for me for many years.
[17:13:16 CET] <justinasvd> Morning, guys.
[17:20:12 CET] <utack> does anyone know if "thebombzen" still resides here occasionally?
[17:21:06 CET] <justinasvd> I came here with a problem, looked at the channel and I immediatelly understood how to solve the problem.
[17:21:09 CET] <justinasvd> Thanks, guys.
[17:24:05 CET] <SpeakerToMeat> furq: It kinda works well, only thing, I did a quick test and got an error on a purposefully damage dframe (for the test) but the error was pretty generic, is there any way to get an output that won't kill my console with logs, but will tell me the frame number the error ocurred at? so as to know what frame to verify?
[17:26:30 CET] <SpeakerToMeat> Maybe -v verbose would help?
[17:44:00 CET] <the_gamer> i have a .mp4 which i don't want the sound of but an .wav i want to replace as the audio. how to do this?
[17:48:43 CET] <klaxa> ffmpeg -i input.mp4 -i input.wav -map 0:v -map 1:a -c copy output.mkv
[17:49:28 CET] <the_gamer> thank you
[18:25:05 CET] <ed8> I run a clipping command using -ss and -to option but the resulting file doesn't seem to respect the options
[18:25:08 CET] <ed8> ffmpeg -y -ss 0:00:55.39 -i ./data/partie-1:-Apprendre-300-mots-du-quotidien-en-LSF.jauvert-laura.hd.webm -to 0:00:58.10 -c copy -loglevel error videos-hd/maintenant.webm
[18:25:25 CET] <ed8> However:
[18:25:29 CET] <ed8> mplayer -vo null -ao null -frames 0 -identify ./videos-hd/maintenant.webm 2>/dev/null
[18:25:38 CET] <ed8> give ID_LENGTH=62.32
[18:26:31 CET] <ed8> i'm using ffmpeg version 4.0.3-1~18.04.york0
[18:30:15 CET] <klaxa> cutting with codec copy is only possible at keyframes
[18:30:26 CET] <klaxa> if you want exact cuts you have to re-encode
[18:32:40 CET] <ed8> well here, the more I advance in the source video the bigger are the files
[19:06:02 CET] <SpeakerToMeat> Size should depend on video length, and partially, on its contents
[19:09:07 CET] <ServiceRobot> good afternoon everyone
[22:05:01 CET] <merethan> Hi all
[22:13:20 CET] <merethan> I need some advice on transforming some video in a smarter way.
[22:14:59 CET] <merethan> I currently do two things with ffmpeg. First step is converting a radial perspective into a equirectangular perspective (yes this is about 360 cam footage). I do this using a mapping like so:
[22:14:59 CET] <merethan> ffmpeg -i 360footage.mp4 -i 360fly_3840x1920_x.pgm -i 360fly_3840x1920_y.pgm -lavfi remap 360footage_equirectangular.mp4 (Those mapings were generated using https://github.com/prouast/equirectangular-remap) Works beautifully well.
[22:15:11 CET] <merethan> The second step involves some scaling and padding because my 360 cam has a blindspot, which requires some compensation. Essentially the frame needs to be scaled horizontally into the upper 2/3rd of the frame, and the lower 1/3rd of the frame needs to be blacked out. I do this like so:
[22:15:11 CET] <merethan> ffmpeg -i 360footage_equirectangular.mp4 -vf "scale=w=0:h=1320,pad=w=3840:h=1920:y=0:x=-1" 360footage_equirectangular-blindspot.mp4
[22:15:11 CET] <merethan> And now the image works perfectly fine when viewing in 360. Thing is, it is reencoded twice because I invoke ffmpeg twice. Is there a smart way I can use the output of the remap as input for the scaling & padding, without having to run ffmpeg (and thus the encoding process) twice?
[22:16:49 CET] <merethan> When I add the argumkents together ffmpeg refuses because it wants to run both transformations on the same input, rather than having them set up as a pipeline.
[22:18:45 CET] <merethan> Oh oops I confused horizontally with vertically in my question :P
[22:39:09 CET] <durandal_1707> merethan: remap does do interpolation for pixels
[22:39:50 CET] <durandal_1707> *NOT do
[22:42:33 CET] <merethan> I'm trying to understand why you mention this durandal_1707, but I don't get it. What do you mean exactly?
[22:43:30 CET] <durandal_1707> merethan: worse quality if you zoom in pixels
[22:45:05 CET] <merethan> Source material (360footage.mp4) is in 2880x2880
[22:45:59 CET] <durandal_1707> it is less noticeable for such high resolutions
[22:46:26 CET] <merethan> To my understanding I cannot escape any zoom or scaling when converting radial to equirectangular.
[22:46:45 CET] <merethan> Do you have any suggestions for improving the conversion quality?
[22:47:48 CET] <durandal_1707> no, there is wip filter to do equirectangular to cubemap and back but not radial thing
[22:48:08 CET] <merethan> Mm shite.
[22:49:05 CET] <durandal_1707> with pixel interpolation you get better edges
[22:49:07 CET] <durandal_1707> imho
[22:49:22 CET] <durandal_1707> but that is also slower
[22:49:55 CET] <merethan> I am relatively new to ffmpeg so I don't understand yet how all those operations fit together.
[22:50:21 CET] <merethan> Do you see any way I can improve my pipeline qualitywise?
[22:51:20 CET] <merethan> Also, I am very curious how 360fly themselves do it, as their desktop app is essentially a task-specific gui around ffmpeg. There's ffmpeg.dll in their install folder.
[22:51:30 CET] <durandal_1707> no unfortunately, there is some software like hugin? but it works with images only
[22:52:00 CET] <JEEB> merethan: generally people just decode with FFmpeg's libraries and then pass it onto their own filters, which can be software or HLSL/GLSL shaders
[22:52:07 CET] <durandal_1707> merethan: hard to tell without RE, they can do it by own implementation
[22:52:12 CET] <JEEB> I'd be surprised if they implemented the thing in libavfilter
[22:52:25 CET] <merethan> Mm well skipping an encoding pass will already improve things, probably. So if that works I already made a good step.
[22:52:45 CET] <durandal_1707> yea, they probably use GPU nice shaders, with free interpolation
[22:54:03 CET] <durandal_1707> there is wip framework, vulkan filters which could speed up thing in libavfiler speed wise and quality wise
[22:58:29 CET] <merethan> Now I look at it, the way you put the arguments together was super obvious durandal_1707 :P
[22:58:49 CET] <merethan> Guess I gave up too quick
[22:59:30 CET] <merethan> I have to leave for a moment, as I need to stop all programs to free ram. Else I don't have enough to do the encoding.
[22:59:48 CET] <merethan> Xorg also has to go ;)
[22:59:59 CET] <merethan> I'll be back later.
[23:17:11 CET] Action: merethan ran out of mems
[23:17:13 CET] <merethan> 3.3GiB does not cut it, apparently.
[23:24:46 CET] <merethan> durandal_1707, it seems I cannot do the two steps in one go, as I run out of memory. Is there a smart way of reducing the quality loss in the first encoding step?
[23:41:21 CET] <durandal_1707> merethan: use lossless encoder for mid step
[23:42:36 CET] Action: merethan searches the docs
[23:43:09 CET] <durandal_1707> ffvhuff in nut
[23:43:25 CET] <merethan> ?
[23:43:41 CET] <merethan> Did you nut?:P
[23:45:45 CET] <durandal_1707> nut is ffmpeg container
[00:00:00 CET] --- Mon Dec 17 2018
More information about the Ffmpeg-devel-irc
mailing list