Re: [FFmpeg-user] does mp4 support timed metadata
Hi, I read one article from microsoft, i.e. https://docs.microsoft.com/en-us/azure/media-services/media-services-specifications-live-timed-metadata azure will put timed metadata into fmp4, and will support various formats of timed metadata. As mpegts demuxer/muxer in ffmpeg support id3 tag, does ffmpeg's mp4 support the feature? Thanks! Regards Andrew At 2019-11-01 02:15:09, "Ted Park" wrote: >> does mp4 support timed metadata, such as id3 timed metadata? > >I think you asked about timed id3 before as well, for Transport Streams and >rtmp previously, But only ever provide a vague picture of what you’re trying >to do. > >That’s your prerogative of course, but I’m limited to giving general advice to >(extremely) general situations you present… And I fear you’re getting further >and further away from what would be reasonable practice in however you >implement timed metadata in whatever project you’re working on. > >First of all, there are several flavors of the “mp4” container. If you use the >most general specification for it (which I think corresponds to -f mov for >some reason) then you can pretty much put any stream in an mp4, though you >might have to specify the codec tag, and if there’s no encoder, just make it >copy unknown codec streams. > >But why?? I’m curious what you’d use a containerized file like mp4 with a >private stream with a couple packets at best, which might not even be decoded >right for. >___ >ffmpeg-user mailing list >ffmpeg-user@ffmpeg.org >https://ffmpeg.org/mailman/listinfo/ffmpeg-user > >To unsubscribe, visit link above, or email >ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] splitting and concatenating file results in a different file
A bit more information on this issue, after created the concatenated file with the following commands [1] and [2], pasted at bottom, if I print pkt_pts_time via ffprobe with commands [3] and [4], I see that the timestamp of frame 302 is what is throwing things off when I compare the two list of frames: frames_input: ... 300:frame,9.97,P 301:frame,10.00,P 302:frame,*10.03*,I 303:frame,10.07,B ... frames_concat: ... 300:frame,9.97,P 301:frame,10.00,P 302:frame,*10.083008*,I 303:frame,10.116341,B ... [1] ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10 chunk_%03d.mp4 [2] ffmpeg -f concat -safe 0 -i mylist.txt -c copy concat.mp4 [3] ffprobe -select_streams v -show_entries frame=pict_type,pkt_pts_time -of csv input.mp4 | grep -n frame > frames_input [4] ffprobe -hide_banner -select_streams v -show_entries frame=pict_type,pkt_pts_time -of csv concat.mp4 | grep -n frame > frames_concat [5] diff frames_input frames_concat ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] make mp4 from mkv and change frame rate
Hope I’m not doing something wrong here. I’m answering my own question. Or sort of. I don’t have an ffmpeg answer but I do have a way to do it easily enough: use VLC. I tried it yesterday and it worked perfectly. Taking a 30fps mkv and making a perfect 25fps mp4 and then taking a 24fps mkv and making a perfect 25fps mp4. Just thought I’d mention it. Sent from Mail for Windows 10 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] does mp4 support timed metadata
> does mp4 support timed metadata, such as id3 timed metadata? I think you asked about timed id3 before as well, for Transport Streams and rtmp previously, But only ever provide a vague picture of what you’re trying to do. That’s your prerogative of course, but I’m limited to giving general advice to (extremely) general situations you present… And I fear you’re getting further and further away from what would be reasonable practice in however you implement timed metadata in whatever project you’re working on. First of all, there are several flavors of the “mp4” container. If you use the most general specification for it (which I think corresponds to -f mov for some reason) then you can pretty much put any stream in an mp4, though you might have to specify the codec tag, and if there’s no encoder, just make it copy unknown codec streams. But why?? I’m curious what you’d use a containerized file like mp4 with a private stream with a couple packets at best, which might not even be decoded right for. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] splitting and concatenating file results in a different file
Thanks Carl, here is the full output from each of those commands. Nothing unusual that I can see. I have truncated the diff output, because the output is superfluous after those three frames are inserted after chunk_000.mp4. I'll point out that the second-to-last line of the concat filter command appears to properly show 4,073 frames, but then when converting to .jpg, 4,076 frames are produced. ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10 chunk_%03d.mp4 ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.8) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat58. 29.100 / 58. 29.100 libavdevice58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc55. 5.100 / 55. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:02:15.84, start: 0.00, bitrate: 5041 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4906 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) Metadata: handler_name: VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name: SoundHandler [segment @ 0x7fb231815800] Opening 'chunk_000.mp4' for writing Output #0, segment, to 'chunk_%03d.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.29.100 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 4906 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default) Metadata: handler_name: VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name: SoundHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [segment @ 0x7fb231815800] Opening 'chunk_001.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_002.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_003.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_004.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_005.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_006.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_007.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_008.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_009.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_010.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_011.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_012.mp4' for writing [segment @ 0x7fb231815800] Opening 'chunk_013.mp4' for writing/A speed= 245x frame= 4073 fps=0.0 q=-1.0 Lsize=N/A time=00:02:15.81 bitrate=N/A speed= 258x video:81321kB audio:2137kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown ffmpeg -f concat -safe 0 -i mylist.txt -c copy concat.mp4 ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.8) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract
Re: [FFmpeg-user] splitting and concatenating file results in a different file
Let me correct me previous statement slightly. It would appear that there aren't three frames inserted at the beginning of chunk_001.mp4 in concat.mp4. There is one frame inserted there, that causes an off-by-one error, and then I would imagine that the second and third superfluous frames are inserted at the beginning of different chunks. There are 14 chunks in all, so it isn't an extra frame at each chunk, as there are only three extra frames in the concatenated file. Thanks again, Jon On Thu, Oct 31, 2019 at 1:22 PM Jon Beyer wrote: > Thanks Carl, here is the full output from each of those commands. Nothing > unusual that I can see. I have truncated the diff output, because the > output is superfluous after those three frames are inserted after > chunk_000.mp4. I'll point out that the second-to-last line of the concat > filter command appears to properly show 4,073 frames, but then when > converting to .jpg, 4,076 frames are produced. > > > > ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10 > chunk_%03d.mp4 > > ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers > built with Apple clang version 11.0.0 (clang-1100.0.33.8) > configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_1 --enable-shared > --enable-pthreads --enable-version3 --enable-avresample --cc=clang > --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include > -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin > -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls > --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame > --enable-libopus --enable-librubberband --enable-libsnappy > --enable-libtesseract --enable-libtheora --enable-libvidstab > --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 > --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype > --enable-frei0r --enable-libass --enable-libopencore-amrnb > --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp > --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack > --disable-indev=jack > libavutil 56. 31.100 / 56. 31.100 > libavcodec 58. 54.100 / 58. 54.100 > libavformat58. 29.100 / 58. 29.100 > libavdevice58. 8.100 / 58. 8.100 > libavfilter 7. 57.100 / 7. 57.100 > libavresample 4. 0. 0 / 4. 0. 0 > libswscale 5. 5.100 / 5. 5.100 > libswresample 3. 5.100 / 3. 5.100 > libpostproc55. 5.100 / 55. 5.100 > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > encoder : Lavf56.40.101 > Duration: 00:02:15.84, start: 0.00, bitrate: 5041 kb/s > Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, > 1280x720 [SAR 1:1 DAR 16:9], 4906 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc > (default) > Metadata: > handler_name: VideoHandler > Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, > stereo, fltp, 128 kb/s (default) > Metadata: > handler_name: SoundHandler > [segment @ 0x7fb231815800] Opening 'chunk_000.mp4' for writing > Output #0, segment, to 'chunk_%03d.mp4': > Metadata: > major_brand : isom > minor_version : 512 > compatible_brands: isomiso2avc1mp41 > encoder : Lavf58.29.100 > Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, > 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 4906 kb/s, 30 fps, 30 tbr, 15360 tbn, > 30 tbc (default) > Metadata: > handler_name: VideoHandler > Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, > stereo, fltp, 128 kb/s (default) > Metadata: > handler_name: SoundHandler > Stream mapping: > Stream #0:0 -> #0:0 (copy) > Stream #0:1 -> #0:1 (copy) > Press [q] to stop, [?] for help > [segment @ 0x7fb231815800] Opening 'chunk_001.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_002.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_003.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_004.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_005.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_006.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_007.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_008.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_009.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_010.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_011.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_012.mp4' for writing > [segment @ 0x7fb231815800] Opening 'chunk_013.mp4' for writing/A speed= > 245x > frame= 4073 fps=0.0 q=-1.0 Lsize=N/A time=00:02:15.81 bitrate=N/A speed= > 258x > video:81321kB audio:2137kB subtitle:0kB other streams:0kB global > headers:0kB muxing overhead: unknown > > >
Re: [FFmpeg-user] splitting and concatenating file results in a different file
> Am 31.10.2019 um 14:55 schrieb Jon Beyer : > > I'm trying to understand the basics of splitting a file on I frames and > then concatenating the smaller files back together. The fundamentals are that ffmpeg is a transcoding application, not a file archiver. Your command lines should provide identical output for some input files, but without the command lines you tested posted together with the complete, uncut console output there is not much we can say (or guess). Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] splitting and concatenating file results in a different file
I'm trying to understand the basics of splitting a file on I frames and then concatenating the smaller files back together. I am using the commands below to split a basic .mp4 file with the "-f segment" option, and then I use "-f concat" to join them. I then extract all frames from the file as .jpg files and compare the results. The concatenated version has three extra frames that seem to appear at what would be the start of the second chunk. Any idea what is going on here, and how to correct it? Thanks in advance! ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_time 10 chunk_%03d.mp4 ffmpeg -f concat -safe 0 -i mylist.txt -c copy concat.mp4 ffmpeg -i input.mp4 video1/frames_%05d.jpg ffmpeg -i concat.mp4 video2/frames_%05d.jpg diff -r video1/ video2/ ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] make mp4 from mkv and change frame rate
I have been trying to fix a frame rate problem I got. I had an mp4 at the wrong rate for my t.v. It was at 30fps and my tv wants 25fps it seems. I got it changed with ffmpeg but the audio is out of sync. There's suggestions for how to get it back but they seem to be suggestions for changing a fixed discrepancy in time. I think this problem is not linear like that but the thing goes increasingly out of sync as the video plays. So I've just thought to start from the beginning and query the community again maybe. I don't know that's going to help at all but that's what I'm doing here. the beginning was a matroska mkv file.and here's what ffprobe says about it: Input #0, matroska,webm, from 'ACPOTBEGIN.MKV': Metadata: ENCODER : Lavf58.29.100 Duration: 00:25:43.27, start: 0.00, bitrate: 931 kb/s Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default) Metadata: DURATION : 00:25:43.15600 Stream #0:1(eng): Audio: aac (LC), 44100 Hz, stereo, fltp (default) Metadata: HANDLER_NAME : SoundHandler ENCODER : Lavc58.54.100 aac DURATION : 00:25:43.26700 Any ideas how to get from there to a good file at 25fps? :) - Remember Brandolini's Law and look around. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".