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

burek burek021 at gmail.com
Sun Sep 2 03:05:02 EEST 2018


[00:17:32 CEST] <juny> hi just wanna make sure that ffmpeg is not deprecated as commented on https://unix.stackexchange.com/questions/279243/merge-mp3-files
[00:19:07 CEST] <durandal_1707> juny: it is not deprecated, deprecation misinformation came from fork
[00:19:38 CEST] <juny> ok i will make a comment on that thread
[00:23:28 CEST] <BtbN> haven't heard that in a long time...
[00:30:57 CEST] <juny> how can i get a static build of ffmpeg so that I can use it in my function as a service deployment?
[00:34:01 CEST] <BtbN> what?
[00:39:29 CEST] <juny> aws lambda is an example of FaaS
[00:40:41 CEST] <juny> its environment get recreated every time it is relaunched. so, i either need to install ffmpeg every time it restarts or have a static build (binary file) in the deployment?
[00:57:55 CEST] <c_14> juny: either build it yourself, or use something like https://johnvansickle.com/ffmpeg/
[01:08:46 CEST] <RentalMind> Trying to figure out an issue with black frames after trimming video with ffmpeg. One of the solutions seems to be to re-encode, but I'm confused about the syntax (ffmpeg -ss %2 -t %3 -i %1 %~n1_cut%~x1). What does % mean?
[01:10:49 CEST] <c_14> that's probably a batch script?
[01:10:53 CEST] <c_14> in which case those are variable names
[01:11:50 CEST] <RentalMind> I found it here https://video.stackexchange.com/questions/18284/cutting-with-ffmpeg-results-in-few-seconds-of-black-screen-how-do-i-fix-this
[01:12:00 CEST] <juny> yea, I will check out https://johnvansickle.com/ffmpeg/  I wonder how to build it myself. Is it a complicated process?
[01:14:12 CEST] <c_14> juny: depends how much you know about building and linking software
[01:14:23 CEST] <c_14> RentalMind: yeah, it's a batch script. those refer to arguments passed to the script
[01:15:51 CEST] <juny> close to nothing...
[01:16:44 CEST] <c_14> then it might seem complicated
[01:17:01 CEST] <juny> using cmake files?
[01:17:02 CEST] <RentalMind> c_14: Gotcha! Should I still try to re-encode as is suggested? I've used this: ffmpeg -i test.mkv -ss 00:00:10 -c copy test2.mkv
[01:18:18 CEST] <c_14> I mean, reencoding will get rid of the issue. If you're fine with reencoding that might be easiest
[01:18:37 CEST] <c_14> (depending on encoding settings, possible visible quality drop)
[01:18:44 CEST] <RentalMind> I also tried dropping -c copy, but that wasn't really helping
[01:19:01 CEST] <c_14> you got black frames even without that?
[01:19:52 CEST] <RentalMind> Not quite, but when I start playing the file it's kind of iffy, like as if it was corrupt
[01:20:24 CEST] <c_14> maybe there's something wrong with the input video? does it happen for other files?
[01:20:58 CEST] <RentalMind> I have 10 files, it's about half work fine with ffmpeg -i test.mkv -ss 00:00:10 -c copy test2.mkv, the others have black frames
[01:21:34 CEST] <RentalMind> Otherwise they play well, just want to trim them
[01:22:17 CEST] <c_14> what version of ffmpeg are you using?
[01:22:20 CEST] <c_14> updating might help
[01:23:35 CEST] <RentalMind> Will try
[01:24:03 CEST] <RentalMind> I forget, can I just replace the bin folder?
[01:25:30 CEST] <c_14> Windows? yeah should be fine
[01:25:35 CEST] <RentalMind> Yep
[01:25:36 CEST] <RentalMind> ok
[01:31:06 CEST] <RentalMind> Is -c short for codec?
[01:39:24 CEST] <c_14> yep
[01:39:39 CEST] <c_14> -c:v would be video and -c:a audio
[01:45:11 CEST] <RentalMind> I got it to work now with ffmpeg -i test.mkv -ss 00:00:10 -c:v libx264 -crf 18 -preset medium -c:a copy test2.mkv
[01:45:30 CEST] <RentalMind> Should I just play with the crf and preset values to get bitrate closer to the original?
[01:51:25 CEST] <juny> C_14, I got the static build in my local environment, it didn't work when I ran subprocess.run(['./ffmpeg', '-i', "concat:./1.mp3|./2.mp3", '-acodec', 'copy', './3.mp3'])
[01:52:08 CEST] <juny> when I changed the path of ffmpeg, it complained that no file, so, I am kind of sure it can find ffmpeg but somehow, it fails to execute.
[01:54:46 CEST] <c_14> did it output an error?
[01:54:57 CEST] <juny> no error
[01:55:11 CEST] <juny> it works if i run in the terminal directly ./ffmpeg -i "concat:./1.mp3|./2.mp3" -acodec copy ./3.mp3
[01:55:12 CEST] <c_14> RentalMind: 18's probably overkill. increase it a bit and check the video quality
[01:55:38 CEST] <RentalMind> Quality is nice, might just keep it. Just wondered if I could get the bitrate higher
[01:55:50 CEST] <c_14> juny: check the subprocess stderr?
[01:56:18 CEST] <c_14> RentalMind: higher? crf 18 is normally visually lossless. There's no point lowering it unless you see something wrong in the video
[01:57:23 CEST] <RentalMind> I don't know a lot about video, but the bitrate of the new video is 25% lower. Like I said, looks fine, so I'll just keep it as is
[01:59:03 CEST] <juny> I got this from the return value: CompletedProcess(args=['./ffmpeg', '-i', 'concat:1.mp3|2.mp3', '-acodec', 'copy', '3.mp3'], returncode=1)
[01:59:52 CEST] <juny> and also CompletedProcess(args=['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], returncode=1) depending on how I set the path of the mp3
[02:01:31 CEST] <c_14> juny: check result.stderr i.e. check stderr on the returned CompletedProcess object
[02:02:47 CEST] <juny> output = subprocess.run(['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'])     print(output)     print(output.stderr)     print(output.stdout)
[02:03:08 CEST] <juny> and I got CompletedProcess(args=['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], returncode=1) None None
[02:03:40 CEST] <juny> mp3 and ffmpeg have permission 755.
[02:03:53 CEST] <c_14> that's strange
[02:04:02 CEST] <c_14> ffmpeg should always write to stderr unless you tell it not to
[02:04:38 CEST] <c_14> eh, set capture_output to True
[02:04:42 CEST] <c_14> it's an option of the run method
[02:05:50 CEST] <furq> juny: delete 3.mp3 or add -y
[02:06:07 CEST] <furq> ffmpeg will just quit automatically if stdin isn't connected and it can't prompt you to overwrite
[02:06:52 CEST] <juny> there is no 3.mp3 as i deleted after i ran from command line. i noticed it prompts to ask to overwrite
[02:07:26 CEST] <juny> when i have output = subprocess.run(['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], capture_output=True), I got this error:
[02:07:27 CEST] <juny> __init__() got an unexpected keyword argument 'capture_output': TypeError
[02:09:05 CEST] <c_14> it's listed in the docs, what python version is this?
[02:11:05 CEST] <juny> Python 3.6.5
[02:13:04 CEST] <juny> python 3.6 doesn't have capture_output, I just checked the doc: https://docs.python.org/3.6/library/subprocess.html
[02:14:21 CEST] <c_14> yeah, that's 3.7 apparently
[02:14:25 CEST] <furq> iirc you had to use subprocess.Popen before 3.7
[02:14:26 CEST] <c_14> >This does not capture stdout or stderr by default. To do so, pass PIPE for the stdout and/or stderr arguments.
[02:14:44 CEST] <furq> there's a warning in old docs about using stderr=PIPE with subprocess.run
[02:14:55 CEST] <furq> but these are the 2.x docs so maybe they fixed that in 3
[02:18:32 CEST] <juny> I tried this output = subprocess.run(['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], shell=True, check=True)
[02:20:26 CEST] <juny> tried  output = subprocess.run(['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], stdout=subprocess.PIPE)
[02:20:41 CEST] <juny> and got CompletedProcess(args=['./ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3'], returncode=1, stdout=b'')
[02:23:20 CEST] <furq> yeah the text output is on stderr
[02:24:50 CEST] <juny> i will try subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE) ? does this look correct?
[02:26:22 CEST] <juny> how to view the stderr
[02:27:24 CEST] <c_14> out,err = proc.communicate()
[02:30:22 CEST] <juny> what is proc here?
[02:30:39 CEST] <juny> I found this thread: https://stackoverflow.com/questions/16198546/get-exit-code-and-stderr-from-subprocess-call and using the code snippet with ffmpeg command
[02:31:41 CEST] <c_14> the return value of the Popen command
[02:31:54 CEST] <c_14> the object returned, rather
[02:33:25 CEST] <juny> p = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, env=new_env)     out,err = p.communicate()                  right?
[02:34:39 CEST] <c_14> yeah
[02:34:42 CEST] <c_14> then look at err
[02:35:07 CEST] <juny>  https://pastebin.com/2pvkT7Mm <- this is what I got after following the code snippet on the stackoverflow
[02:36:35 CEST] <juny>  I/O operation on closed file.: ValueError ....etc <- and this is what I get from p.communicate
[02:37:52 CEST] <juny> https://pastebin.com/33pg5etQ <- this is what I get from p.communicate
[02:38:03 CEST] <c_14> hmm, it's either not passing the arguments correctly or passing them weirdly
[02:39:20 CEST] <c_14> hmm, ffmpeg only outputs that if it's called without arguments
[02:39:50 CEST] <juny> the path of the mp3 is not correct?
[02:41:05 CEST] <juny> if i change to ['ffmpeg', '-i', 'concat:./1.mp3|./2.mp3', '-acodec', 'copy', './3.mp3']. without './ffmpeg', I get "errorMessage": "[Errno 2] No such file or directory: 'ffmpeg'",
[02:41:15 CEST] <juny> so, I think ./ffmpeg is correct
[02:41:29 CEST] <juny> and all the mp3 are in the same folder.
[02:41:35 CEST] <juny> not the 3.mp3
[02:41:41 CEST] <c_14> the 2pvkT7Mm one, is that with shell=True?
[02:42:14 CEST] <juny> yea output = subprocess.check_output(         cmnd, stderr=subprocess.STDOUT, shell=True, timeout=3,         universal_newlines=True)
[02:42:26 CEST] <juny> from stackoverflow https://stackoverflow.com/questions/16198546/get-exit-code-and-stderr-from-subprocess-call
[02:43:14 CEST] <juny> maybe this part: 'concat:./1.mp3|./2.mp3' is weirdly formed
[02:44:44 CEST] <c_14> set shell=False
[02:45:02 CEST] <c_14> I think with shell=True it's interpreting the | as a pipe in shell syntax
[02:45:44 CEST] <juny> i see
[02:45:55 CEST] <juny> ./3.mp3: Read-only file system <- the last line of the error output
[02:46:14 CEST] <c_14> you can't write into that directory it's read-only
[02:46:30 CEST] <c_14> rather, the filesystem that directory is a part of is read-only
[02:46:50 CEST] <juny> mm
[02:47:23 CEST] <juny> is it possible to generate binary of mp3 and have it uploaded to a server?
[02:47:31 CEST] <juny> i am using aws lambda
[02:47:48 CEST] <c_14> hmm?
[02:48:04 CEST] <juny> but then, when i run the command in the terminal, i could create 3.mp3
[02:51:56 CEST] <c_14> hmm
[02:54:03 CEST] <juny> with this output
[02:54:04 CEST] <juny> https://pastebin.com/nNjM79gH
[02:54:31 CEST] <c_14> that looks fine
[02:54:55 CEST] <c_14> but in python it says it's read-only?
[02:55:06 CEST] <c_14> try using an absolute path?
[02:55:50 CEST] <juny> right, in python using subprocess, it says Read-only file system
[02:59:10 CEST] <juny> the same error when i used absolute file path
[02:59:39 CEST] <juny> i made sure it is the right path by changing the path of ffmpeg and also 1 and 2.mp3 and i would get error if the path was not correct
[03:00:24 CEST] <c_14> hmm, what if you tried running ['touch', './3.mp3'] in the python script?
[03:01:39 CEST] <juny> right, i was trying that but no file was created
[03:01:50 CEST] <juny> subprocess.run(['touch', '/var/task/3.mp3'])
[03:02:18 CEST] <juny> that is the absolute path that i got from os.getcwd
[03:05:41 CEST] <juny> thanks c_14, I am heading out. if you happen to find a solution, you can post it on this stackoverflow thread https://stackoverflow.com/questions/47882810/lambda-not-connecting-to-ffmpeg/48788269#48788269
[03:05:45 CEST] <juny> thanks
[04:43:30 CEST] <leif> Is there any way to use something like av_dump_format to dump info about all of the streams?
[04:43:36 CEST] <leif> (instead of just 1)
[04:43:50 CEST] <leif> Or do you just have to call it repeatedly for each stream in the format?
[05:23:40 CEST] <morpheus_017> Hello there! I would like to use libavdevice to capture raw frames from dshow and gdigrab, yet i'm not sure where to start. I found examples/demuxing_decoding.c, but it doesnt looks like what i'm searching form
[05:38:56 CEST] <FishPencil> Is there a way to combine two png images ontop of eachother? One of them is transparent for most of the image, and I'd like to layer it ontop of the background and save to an output flattened png
[05:43:29 CEST] <kepstin> FishPencil: if your inputs and outputs are all still images, you'd probably be better off using imagemagick (the "convert" tool) rather than ffmpeg.
[05:44:21 CEST] <kepstin> (ffmpeg can do what you want with the overlay filter if you really want to use ffmpeg for this)
[06:39:46 CEST] <kevev> Howdy!
[06:39:55 CEST] <kevev> I am seeking help with an ffmpeg issue
[06:40:41 CEST] <kevev> ffmpeg -re -i "http://HOSTNAME:1935/live/path/playlist.m3u8" -acodec copy -bsf:a aac_adtstoasc -vcodec copy -f flv rtmp://CDN/Path/Path
[06:41:00 CEST] <kevev> That is the command I am using. FFMPEG keeps dying
[06:41:26 CEST] <kevev> WriteN, RTMP send error 104 (136 bytes)6kB time=00:00:20.37 bitrate=1204.6kbits/s speed=   1x
[06:41:33 CEST] <kevev> WriteN, RTMP send error 32 (43 bytes)
[06:41:39 CEST] <kevev> WriteN, RTMP send error 9 (42 bytes)
[06:41:47 CEST] <kevev> av_interleaved_write_frame(): Operation not permitted
[06:41:54 CEST] <kevev> [flv @ 0x475b6c0] Failed to update header with correct duration.
[06:42:00 CEST] <kevev> [flv @ 0x475b6c0] Failed to update header with correct filesize.
[06:42:23 CEST] <kevev> I am wondering if it is because the feed is multibitrate.
[06:42:29 CEST] <kevev> Anyway to make this work?
[06:42:32 CEST] <kevev> THanks in advance
[06:45:45 CEST] <kepstin> kevev: all that really tells you is that the remote flash media server is closing the connection on you for some reason. You need to check the cdn's requirements and ensure you're within them in terms of codecs, bitrates, etc.
[06:45:55 CEST] <kepstin> also you shouldn't use -re if your input is live
[06:46:05 CEST] <kevev> oh
[06:46:14 CEST] <kepstin> (-re is used to slow ffmpeg down when reading from a local file)
[06:46:33 CEST] <kevev> kepstin: I am attempting to pull a multibitrate feed from one site and forward it via rtmp to our CDN/Transcoder.
[06:47:17 CEST] <kepstin> kevev: I suspect you might have to do transcoding in ffmpeg if the input stream is using codecs/settings that your cdn can't handle.
[06:47:31 CEST] <kevev> The stream works for a bit then dies.
[06:49:13 CEST] <kepstin> like I said - check the cdn's codec/bitrate specifications, ensure that you're meeting them. Remove the -re option (in some cases that can make ffmpeg slow down a realtime input, which could cause issues).
[06:49:14 CEST] <kevev> kepstin: It's working with -re removed *fingers crossed*
[07:12:04 CEST] <kevev_> kepstin: If it is a multibitrate stream am I pulling and pushing that same multibitrate stream with the command I am using? Need to be sure the CDN is receiving what ffmpeg is. Basically CDN viewers need to have variable bitrate in case they have fluctuating internet connections.
[07:12:50 CEST] <kepstin> kevev_: I don't have enough info to answer that question.
[07:14:13 CEST] <kevev_> kepstin: OK sorry. I believe the feed we are pulling(m3u8 HLS) is multibitrate.
[07:14:21 CEST] <kevev_> Our CDN is not transcoding.
[07:15:28 CEST] <kepstin> so, this depends on exactly how the input is set up. if it's something like SVC i suppose ffmpeg might be copying the whole thing (but it's probably not svc, that's very rare)
[07:15:43 CEST] <kepstin> more likely there's multiple independent video streams and ffmpeg is only copying one
[07:16:24 CEST] <kepstin> (as for which one, you might be able to tell from the ffmpeg output)
[07:17:30 CEST] <kepstin> if your cdn accepts multiple video streams in a single input, you might be able to send them by using appropriate -map options in ffmpeg (or using multiple inputs to ffmpeg with -map options, if you need to use different .m3u8 playlists per quality)
[07:17:49 CEST] <kepstin> that'll obvously only work if your cdn knows how to deal with that
[07:19:23 CEST] <kepstin> check your cdn docs for whether they support multi bitrate streams, and how to send them :/
[07:20:12 CEST] <kepstin> (someone here might be able to help you translate docs/specs to ffmpeg commands)
[07:20:40 CEST] <kepstin> not me right now tho, i'm off to bed :)
[07:22:27 CEST] <kevev__> kepstin: OK thanks
[12:39:56 CEST] <evng> Hi, I'm trying to re-encode a live http mpeg-ts stream with ffmpeg. This stream keeps disconnecting every couple seconds and sens parts of the video that has already been showed before. How can i tell ffmpeg to ignore audio/video that has already been processed, based on the original ts timestamp?
[12:41:00 CEST] Last message repeated 1 time(s).
[15:00:53 CEST] <excalith> hello fellow ffmpeg users, i am trying to concat 2 video files without their audio. instead, i want to add a new audio. is it possible to do that without re-encoding?
[15:02:47 CEST] <DHE> yes, but as usual the 2 input videos must be compatible
[15:09:33 CEST] <excalith> @DHE, thanks for the info mate. seems like i am using -an in a wrong way
[15:09:34 CEST] <excalith> ffmpeg -f concat -i list.txt -an -i audio.mp3 -c:v libx264 output.mp4
[15:10:22 CEST] <excalith> seems like code above doesn't read audio.mp3, instead overrides -an
[15:17:29 CEST] <furq> excalith: -an is an output option
[15:17:40 CEST] <furq> you probably want -map 0:v -map 1:a
[15:18:01 CEST] <excalith> i see
[15:18:04 CEST] <excalith> makes sense
[15:18:11 CEST] <excalith> thanks, i will give it a try right now
[15:21:15 CEST] <excalith> @furq works like a charm! thanks!
[16:48:19 CEST] <nyuszika7h> I recorded a HLS live stream but the timestamps are messed up because it uses EXT-X-DISCONTINUITY, is there any way to fix the timestamps in the file to make them monotonous? (H.264 in .ts container)
[17:22:37 CEST] <keglevich> test
[17:42:06 CEST] <keglevich> hello all... can please someone check the issue here: https://imgur.com/a/zFx8hzw
[17:42:49 CEST] <keglevich> I'm wondering, why PCR-Interval is different when using ffmpeg with CasparCG? Why it jumps from 1ms to 30ms all the time? How can I set it fixed to 30ms?
[17:50:00 CEST] <Something1> Hello. I am using ffmpeg to concat 3 video files together. I encode the video stream and copy the audio stream. The videos are 30 seconds long each, but I would like to trim the last 10 seconds off of each video. Is there a way to do this? Concat with trimming?
[17:57:46 CEST] <furq> Something1: https://www.ffmpeg.org/ffmpeg-formats.html#concat-1
[17:57:51 CEST] <furq> outpoint
[17:58:07 CEST] <furq> or duration works as well
[17:58:28 CEST] <furq> or rather duration works and outpoint doesn't. nice work furq
[17:59:41 CEST] <Something1> Oh I see! I will try it out, thank you!
[18:17:19 CEST] <Something1> furq: I have no idea how to make it work. I have the input.txt containing three lines of ´file 1.mp4´ up to 3, and no matter where I place the ´duration´, it doesn´t do anything with it.
[19:17:40 CEST] <Something1> furq: I ended up writing a script to trim everything individually and then piece them together. Thanks for the help though!
[20:29:42 CEST] <trollboy> Howdy, I've got ts files from my dvr, I'd like to convert them losslessly to mkv, but I'm losing things like subtitles, and some of my applications aren't liking the exported files
[20:30:08 CEST] <trollboy> like I can see a preview when I open the dir in finder on the original ts files, I only see the icon for the mkv's
[20:36:42 CEST] <Something1> What is the command you are using to convert them to mkv, trollboy? Just ffmpeg -c output.mkv?
[20:36:57 CEST] <Something1> ffmpeg -c copy output.mkv *
[20:39:56 CEST] <ariyasu> what are your subtitles?
[20:40:03 CEST] <ariyasu> dvb or 888 ?
[20:40:43 CEST] <trollboy> ffmpeg  -y -i "$FILENAME" -map 0:0 -map 0:2 -vcodec copy -acodec copy -f matroska "$TEMPFILENAME"
[20:40:46 CEST] <ariyasu> tl:dr dvb subs are a pain in the bum to deal with and need to be ocr'd to a text based sub format like srt or ass
[20:40:52 CEST] <trollboy> the subtitles appear to be built into the .ts stream
[20:40:58 CEST] <ariyasu> if the subs are 888 you can just copy them
[20:41:21 CEST] <ariyasu> you can use ffprobe or media info to see what the sub format is
[20:41:29 CEST] <JEEB> lol calling teletext 888
[20:42:06 CEST] <JEEB> trollboy: it sounds like you aren't mapping the subtitle track?
[20:42:07 CEST] <ariyasu> :p
[20:43:46 CEST] <ariyasu> i have a messy batch script i made to deal with subtitle extraction from .ts files, it may be of some use to you
[20:43:47 CEST] <ariyasu> https://pastebin.com/cnKZaMjC
[20:44:41 CEST] <JEEB> also I am not sure if you can just copy a teletext track as-is into matroska...
[20:44:52 CEST] <JEEB> it's text subtitles so you can convert it to SRT or ASS or whatever
[20:45:23 CEST] <JEEB> also I just checked matroskaenc.c and DVB subtitles should be muxable just fine
[20:45:32 CEST] <JEEB> static const AVCodecTag additional_subtitle_tags[] = {
[20:45:32 CEST] <JEEB>     { AV_CODEC_ID_DVB_SUBTITLE,      0xFFFFFFFF },
[20:46:17 CEST] <JEEB> so you don't have to OCR it if you don't want to
[20:46:23 CEST] <ariyasu> yes but i think lots of media players have issue with playback
[20:46:34 CEST] <ariyasu> but yeah they are supported in the matroska container
[20:47:12 CEST] <JEEB> you could say the same with ASS subtitles, since most HW plastic toys have issues with them :P
[20:47:24 CEST] <JEEB> it really depends on what your use case is
[20:47:34 CEST] <JEEB> also one should think if they need to re-mux the mpeg-ts to begin with
[20:47:43 CEST] <JEEB> if you don't, just keep the original MPEG-TS file
[20:47:54 CEST] <JEEB> it sucks for seeking, but at least you haven't borked anything :P
[20:49:14 CEST] <trollboy> thanks, I'll give it a try
[20:49:39 CEST] <trollboy> sorry, also dealing with a newly teenage daughter in the house so I'm going back and forth between screaming command lines and screaming 13 yr olds ;-)
[20:49:39 CEST] <JEEB> trollboy: anyways the problem with your command line is just that you only mapped video/audio it seems :P
[20:49:53 CEST] <trollboy> well the subtitles were a "stretch goal"
[20:50:08 CEST] <trollboy> my bigger concern is when I view the dir in finder, I see a preview for the .ts file, but not the .mkv
[20:50:14 CEST] <JEEB> welcome to macs?
[20:50:19 CEST] <JEEB> I mean, it's 100% the OS handling that
[20:50:28 CEST] <JEEB> win10 got limited support for matroska
[20:50:43 CEST] <JEEB> but it's really haphazard if an OS's thumbnailing thing supports matroska or not
[20:50:55 CEST] <furq> https://www.matroska.org/technical/specs/codecid/index.html
[20:50:56 CEST] <trollboy> and I use sick rage to organize it (PVR to dir, then sick rage to sort the file, alert my kodi boxes, etc) and sick rage isn't seeing it eitehr
[20:50:57 CEST] <JEEB> or QuickTime if that's something you play things in
[20:51:02 CEST] <furq> are you sure dvb subs are supported in matroska
[20:51:14 CEST] <JEEB> furq: matroskaenc.c has references to it
[20:51:18 CEST] <JEEB> also IIRC that list lacks a lot of stuff
[20:51:31 CEST] <JEEB> my HEVC thing isn't there, and I'm pretty sure AVC isn't spec'd either?
[20:51:35 CEST] <iive> furq, they've been from the start
[20:51:46 CEST] <furq> nice
[20:52:01 CEST] <furq> i suddenly trust mkvmerge a lot less considering the author pointed me there
[20:52:01 CEST] <JEEB> furq: there really hasn't been a proper mapping registration thing for matroska
[20:52:14 CEST] <iive> hum, ignore me, i was talking about dvd subds
[20:52:19 CEST] <JEEB> furq: http://haali.su/mkv/codecs.pdf
[20:52:25 CEST] <JEEB> that actually contains more specs than that one
[20:52:41 CEST] <JEEB> but still, as I noted - there is no single place where matroska mappings are specified
[20:52:44 CEST] <JEEB> which is really unfortunate
[20:52:56 CEST] <JEEB> https://lists.matroska.org/pipermail/matroska-devel/2013-September/004567.html
[20:53:02 CEST] <JEEB> HEVC is officially only mentioned here :P
[20:53:20 CEST] <JEEB> and I only posted that because DivX was extending the AVC stuff instead of utilizing what 14496-15 would specify for HEVC
[20:53:26 CEST] <furq> i love it when i have to read a mailing list to find out how software works
[20:53:29 CEST] <furq> (hello lennart)
[20:53:53 CEST] <JEEB> but basically that was "do the same you do for mp4, dummies"
[20:53:58 CEST] <JEEB> since that was done for AVC as well
[20:54:12 CEST] <JEEB> just copy MP4 (14496-15 is the NAL unit based formats in mp4 mapping)
[20:54:54 CEST] <JEEB> I found it extra funny when I noticed that AV1 mappings in matroska and mp4 started not being the same, too
[20:55:15 CEST] <JEEB> then someone noticed that and I think they're generally teh same for extradata now?
[20:58:00 CEST] <trollboy> JEEB, here's the output from ffprobe: https://gist.github.com/trollboy/1e7e0561a26ca8d5e819d195c7e4dbe4
[20:58:31 CEST] <JEEB> oh, closed captions
[20:58:36 CEST] <JEEB> those are fun
[20:58:42 CEST] <JEEB> are those not being copied through when remuxing?
[20:58:53 CEST] <JEEB> those are just packets in the video stream
[20:59:04 CEST] <JEEB> also huh
[20:59:13 CEST] <JEEB> your broadcaster uses FFmpeg? :D
[21:01:24 CEST] <JEEB> trollboy: if you play your remux with something like mpv or vlc I would guess when the US style closed captions appear in the video stream they should become available as an alternative
[21:02:54 CEST] <trollboy> I'm using kodi which I believe uses vlc
[21:03:07 CEST] <durandal_1707> wrong
[21:03:23 CEST] <trollboy> my broadcaster is comcast over a HD Homerun recorded by plex then converted
[21:03:34 CEST] <trollboy> or I could be wrong, lol.  What does it use durandal_1707?
[21:03:36 CEST] <JEEB> ah, so plex remuxes with FFmpeg
[21:04:08 CEST] <trollboy> ah cool
[21:04:10 CEST] <ariyasu> there is a service provider called FFmpeg on 7e which i always thought was weird
[21:04:12 CEST] <ariyasu> https://i.imgur.com/Twpm3nl.png
[21:04:22 CEST] <JEEB> yea I noticed that
[21:04:25 CEST] <JEEB> someone's test stream or something
[21:04:36 CEST] <JEEB> or someone actually runs a broadcast MPEG-TS mux with libavformat
[21:04:42 CEST] <JEEB> which sounds awfully chaotic
[21:04:56 CEST] <JEEB> I mean, you can get that somewhat done, but it's got limitations
[21:05:19 CEST] <JEEB> although I'm not sure how broadcasters handle stuff like metadata injection, it doesn't sound like something an encoder would do
[21:05:31 CEST] <JEEB> metadata being stuff like EPG etc
[21:10:29 CEST] <trollboy> so, if this is my current command: ffmpeg  -y -i "$FILENAME" -map 0:0 -map 0:2 -vcodec copy -acodec copy -f matroska "$TEMPFILENAME"  what do I add to include the subtitles?
[21:10:46 CEST] <JEEB> in your case the subtitles are US style captions
[21:10:51 CEST] <JEEB> they're within the video track
[21:11:06 CEST] <JEEB> so since you're mapping the video track and copying it, in theory it should get passed over
[21:11:18 CEST] <JEEB> which is why I recommended testing it in mpv or VLC
[21:11:23 CEST] <JEEB> or heck, even ffprobe I guess?
[21:12:27 CEST] <trollboy> no, the original ts shows 4 subtitles tracks in vlc, the mkv has none
[21:12:40 CEST] <trollboy> the ffprobe results were pasted above
[21:12:45 CEST] <JEEB> that was for the mpeg-ts
[21:12:56 CEST] <JEEB> which just says it has captions in the video track, embedded
[21:13:35 CEST] <JEEB> I meant the output mkv :P
[21:13:57 CEST] <JEEB> although with matroska lavf/ffprobe might just stop at the extradata
[21:13:57 CEST] <trollboy> https://gist.github.com/trollboy/0985645fb1b10f30cbc191a8da4d8cf3
[21:14:01 CEST] <trollboy> that's against the .ts
[21:14:07 CEST] <JEEB> yes I already noted that
[21:14:19 CEST] <JEEB> and that just contains captions embedded in the video track, as I have already noted
[21:14:28 CEST] <trollboy> sorry
[21:14:38 CEST] <trollboy> but when examining the resulting mkv there are no subs
[21:14:40 CEST] <JEEB> so in theory just copying the video track over should copy those SEI packets over as well
[21:14:40 CEST] <trollboy> thus my quandry
[21:15:10 CEST] <JEEB> (SEI packets are a type of packet in the H.264 video format that can contain random crap like captions)
[21:15:27 CEST] <JEEB> unless ffmpeg.c or lavf drop those on the floor when going into mp4 or matroska
[21:15:33 CEST] <trollboy> yeah, I get that but that's not what's going on alas
[21:15:50 CEST] <JEEB> which is why I wanted you to check both vlc and mpv for if the """track""" appears for selection
[21:16:14 CEST] <JEEB> or if ffprobe'ing the output file shows the "Closed Captions" in the video track line
[21:16:40 CEST] <durandal_1707> show ffprobe output of output mkv file?
[21:16:45 CEST] <trollboy> ah, yes I apologize
[21:16:57 CEST] <trollboy> the mkv output *does* show the closed captions in ffmpeg
[21:17:05 CEST] <trollboy> it's just vlc not opting to show it for some reason
[21:17:10 CEST] <JEEB> ok, try mpv
[21:17:27 CEST] <trollboy> I'm not familiar with mpv, handy link?
[21:17:28 CEST] <JEEB> although if you're on 16.04 ubuntu I'm not sure how ancient that gets to be on that system
[21:18:09 CEST] <JEEB> https://mpv.io/ , basically a video player mostly based on FFmpeg's features
[21:18:09 CEST] <trollboy> I've installed the 3rd party ffmpeg sources to get the latest ffmpeg
[21:18:19 CEST] <JEEB> trollboy: except even that isn't latest :P
[21:18:57 CEST] <trollboy> it's *closer* lol
[21:19:03 CEST] <JEEB> true
[21:19:07 CEST] <JEEB> 3.4.x > 2.8.x
[21:19:12 CEST] <JEEB> which IIRC is what came with 16.04
[21:21:27 CEST] <JEEB> but yea, my primary reasoning was that mpv is known to create a new "track" if caption packets are noticed in the video stream
[22:28:43 CEST] <|_|_|> hello...
[22:29:18 CEST] <|_|_|> i use this line: ffmpeg -i a.mp4 -i b.mp3 -c:v copy -c:a aac -strict experimental out3.mp4
[22:29:42 CEST] <|_|_|> but this extend the result to the major size... how to cut the music to the size time of video?...
[22:30:18 CEST] <ariyasu> work out the length of the video
[22:30:24 CEST] <ariyasu> do
[22:30:36 CEST] <|_|_|> ariyasu, how?...
[22:30:48 CEST] <ariyasu> open a.mp4 and look at it's run time
[22:31:03 CEST] <|_|_|> ariyasu, i must manually set the time??...
[22:31:06 CEST] <ariyasu> then use -t to process the mp3 to be the same length
[22:31:25 CEST] <ariyasu> well you can automate the process with a script if it's somthing you are going to be doing often
[22:31:31 CEST] <|_|_|> it's bad...
[22:32:52 CEST] <|_|_|> i need other way....
[22:35:39 CEST] <klaxa> what about -shortest ?
[22:43:53 CEST] <ariyasu> ++
[23:06:15 CEST] <Neon> Hello. I use ffmpeg with -vf "format=yuv420p" -codec:a copy to process MP4 videos made with my smartphone. Usually, this works fine, but recently one of the videos went weird. The video ffmpeg output had a few frames animated properly (like half a second or so), then the last frame froze for a few seconds, and this repeatedly during the whole video. What could cause this?
[23:07:15 CEST] <poutine> Neon, what does it say when you run it through ffmpeg -err_detect explode -i blah.mp4 -f null o
[23:10:08 CEST] <Neon> poutine: This is the full output: https://gist.github.com/Neonit/ed227b47a63dc744b17b84e2b8ce1bf8
[23:12:25 CEST] <poutine> yeah it didn't find anything there
[23:12:30 CEST] <Neon> :(
[23:12:32 CEST] <poutine> "bad source" was all I had
[23:14:31 CEST] <Neon> Apparently the resulting video has 120 fmp, whereas the original has 29. My other videos also have 30 after reencoding...
[23:14:37 CEST] <Neon> fps*
[23:25:34 CEST] <Neon> I tried again and forced output FPS with -r 30 this time and now the result is fine.
[23:26:05 CEST] <Neon> Somehow ffmpeg decided to set the output FPS to 120 automatically.
[23:26:45 CEST] <Neon> Although it detected the source as 29.98 fps. Is this a bug or am I using it wrong?
[00:00:00 CEST] --- Sun Sep  2 2018


More information about the Ffmpeg-devel-irc mailing list