VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. I created a video stream using:
    Code:
    ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\bff.m2v" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -top 0 -f yuv4mpegpipe - | x265 --input - --fps 30000/1001 --output-depth 10 --y4m --profile main10 --crf 18.00 --interlace bff --range limited --colormatrix bt470bg --sar 8:9 --output "J:\tmp\2023-11-24@15_37_21_4710_01.265"
    (attached bff.m2v and 2023-11-24@15_37_21_4710_01.265)
    not I want to multiplex it using:
    Code:
    ffmpeg -y  -r 30000/1001 -fflags +genpts -i "J:\tmp\2023-11-24@15_37_21_4710_01.265" -top 0 -metadata encoding_tool="Hybrid 2023.11.24.1" -c:0 copy -map 0:0  -bsf:v hevc_mp4toannexb -tag:v hvc1  -aspect 20:15 -r 30000/1001 -fflags +genpts -f mpegts "G:\Output\bff.m2ts"
    but end up with:
    Code:
    Input #0, hevc, from 'J:\tmp\2023-11-24@15_18_05_5010_01.265':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], 25 fps, 29.97 tbr, 1200k tbn
    Output #0, mpegts, to 'G:\Output\bff.m2ts':
      Metadata:
        encoder         : Lavf60.17.100
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 25 fps, 29.97 tbr, 90k tbn
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mpegts @ 000002cecd3a87c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mpegts @ 000002cecd3a87c0] first pts and dts value must be set
    [vost#0:0/copy @ 000002cecd38a280] Error submitting a packet to the muxer: Invalid data found when processing input
    [out#0/mpegts @ 000002cecd2afac0] Error muxing a packet
    [out#0/mpegts @ 000002cecd2afac0] video:49kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    size=       6kB time=00:00:00.22 bitrate= 223.1kbits/s speed= 346x
    Conversion failed!
    FFmpeg version I use is:
    Code:
    ffmpeg version N-112813-g1c3b13b9f7-gc961ac4b0c+1 Copyright (c) 2000-2023 the FFmpeg developers
      built with gcc 13.2.0 (Rev2, Built by MSYS2 project)
      configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --disable-doc --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
      libavutil      58. 32.100 / 58. 32.100
      libavcodec     60. 34.100 / 60. 34.100
      libavformat    60. 17.100 / 60. 17.100
      libavdevice    60.  4.100 / 60.  4.100
      libavfilter     9. 13.100 /  9. 13.100
      libswscale      7.  6.100 /  7.  6.100
      libswresample   4. 13.100 /  4. 13.100
      libpostproc    57.  4.100 / 57.  4.100
    the x265 version I use is:
    Code:
    x265 [info]: HEVC encoder version 3.5+111-c40c3d799
    x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
    x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AV

    A few things bug me:
    a. that it's not working
    b. that the created video is detected as 'top first' and '25 fps, 29.97 tbr'.

    Does anyone know how to fix these to issues?

    Cu Selur
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  2. Your bff.m2v:
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x480 [SAR 8:9 DAR 4:3], 25 fps, 29.97 tbr, 1200k tbn
    no duration info

    the same, in a mpg container:
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn
    duration 05.01

    For the muxing of the .265 stream you have to add:
    -bsf:v setts=ts=STARTPTS+N/TB_OUT/29.97
    to your commandline.
    Quote Quote  
  3. That seems to help with:
    Code:
    [mpegts @ 000002cecd3a87c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mpegts @ 000002cecd3a87c0] first pts and dts value must be set
    but using:
    Code:
    ffmpeg -y  -r 30000/1001 -fflags +genpts -i "J:\tmp\2023-11-24@15_37_21_4710_01.265" -top 0 -metadata encoding_tool="Hybrid 2023.11.24.1" -c:0 copy -map 0:0  -bsf:v hevc_mp4toannexb,setts=ts=STARTPTS+N/TB_OUT/29.97  -tag:v hvc1  -aspect 20:15 -r 30000/1001 -fflags +genpts -f mpegts "G:\Output\bff.m2ts"
    gives me:
    Code:
    Input #0, hevc, from 'J:\tmp\2023-11-24@15_37_21_4710_01.265':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], 25 fps, 29.97 tbr, 1200k tbn
    [vost#0:0/copy @ 000002598cd9ac00] Overriding aspect ratio with stream copy may produce invalid files
    Output #0, mpegts, to 'G:\Output\bff.m2ts':
      Metadata:
        encoding_tool   : Hybrid 2023.11.24.1
        encoder         : Lavf60.17.100
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 25 fps, 29.97 tbr, 90k tbn
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mpegts @ 000002598cd9f380] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [vost#0:0/copy @ 000002598cd9ac00] Error submitting a packet to the muxer: Invalid argument
    [out#0/mpegts @ 000002598d07ed00] Error muxing a packet
    [out#0/mpegts @ 000002598d07ed00] video:49kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    size=       6kB time=00:00:00.26 bitrate= 184.1kbits/s speed= 469x
    Conversion failed!
    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  4. My commandline:
    FFmpeg.exe -y -fflags +genpts -i 2023-11-24@15_37_21_4710_01_TSF.mp4 -map 0:0 -c:v copy 2023-11-24@15_37_21_4710_01_TSF_muxed.m2ts
    converted first to mp4 with:
    FFmpeg.exe -r 30000/1001 -i 2023-11-24@15_37_21_4710_01_TSF.265 -map 0:0 c:v copy -bsf:v setts=ts=STARTPTS+N/TB_OUT/29.97 2023-11-24@15_37_21_4710_01_TSF.mp4
    Image Attached Files
    Quote Quote  
  5. Thanks, but strangely, that does not work here:
    Code:
    ffmpeg -y -r 30000/1001 -i "J:\tmp\2023-11-24@15_37_21_4710_01.265" -map 0:0 -c:v copy -bsf:v setts=ts=STARTPTS+N/TB_OUT/29.97 "G:\Output\bff.mp4"
    fails with:
    Code:
    Input #0, hevc, from 'J:\tmp\2023-11-24@15_37_21_4710_01.265':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], 25 fps, 29.97 tbr, 1200k tbn
    Output #0, mp4, to 'G:\Output\bff.mp4':
      Metadata:
        encoder         : Lavf60.17.100
      Stream #0:0: Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 25 fps, 29.97 tbr, 30k tbn
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 00000182213988c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [vost#0:0/copy @ 000001821e50e400] Error submitting a packet to the muxer: Invalid argument
    [out#0/mp4 @ 000001821e509d80] Error muxing a packet
    [out#0/mp4 @ 000001821e509d80] video:49kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    size=       0kB time=00:00:00.26 bitrate=   7.7kbits/s speed= 473x
    will try other ffmpeg versions, maybe its a bug in 'ffmpeg version N-112813-g1c3b13b9f7-gc961ac4b0c+1'.

    Hmm,.. using:
    Code:
    ffmpeg -y  -r 30000/1001 -fflags +genpts -i "J:\tmp\2023-11-24@15_37_21_4710_01.265" -top 0 -metadata encoding_tool="Hybrid 2023.11.24.1" -c:0 copy -map 0:0  -bsf:v hevc_mp4toannexb -tag:v hvc1  -aspect 20:15 -r 30000/1001 "G:\Output\bff.mp4"
    creates an mp4:
    Code:
    Input #0, hevc, from 'J:\tmp\2023-11-24@15_37_21_4710_01.265':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], 25 fps, 29.97 tbr, 1200k tbn
    [vost#0:0/copy @ 0000016222e78980] Overriding aspect ratio with stream copy may produce invalid files
    Output #0, mp4, to 'G:\Output\bff.mp4':
      Metadata:
        encoding_tool   : Hybrid 2023.11.24.1
        encoder         : Lavf60.17.100
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 25 fps, 29.97 tbr, 30k tbn
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mp4 @ 0000016221d63900] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 0000016221d63900] pts has no value
        Last message repeated 141 times
    [mp4 @ 0000016221d63900] pts has no value
        Last message repeated 7 times
    [out#0/mp4 @ 0000016221c86340] video:2432kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.075280%
    size=    2434kB time=00:00:04.90 bitrate=4065.5kbits/s speed=  47x
    Then using:
    Code:
    ffmpeg -y -r 30000/1001 -i "G:\Output\bff.mp4" -map 0:0 -c:v copy -bsf:v setts=ts=STARTPTS+N/TB_OUT/29.97 "g:\Output\bff.m2ts"
    does work:
    Code:
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\Output\bff.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        encoder         : Hybrid 2023.11.24.1
      Duration: 00:00:04.94, start: 0.000000, bitrate: 4038 kb/s
      Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], 3981 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
        Metadata:
          handler_name    : VideoHandler
          vendor_id       : [0][0][0][0]
    Output #0, mpegts, to 'g:\Output\bff.m2ts':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        encoder         : Lavf60.17.100
      Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 3981 kb/s, 29.97 fps, 29.97 tbr, 90k tbn (default)
        Metadata:
          handler_name    : VideoHandler
          vendor_id       : [0][0][0][0]
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [out#0/mpegts @ 000001d95cab9d00] video:2433kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.057972%
    size=    2580kB time=00:00:04.90 bitrate=4309.0kbits/s speed= 941x
    Thanks.
    Creating an intermedia file makes it unpractical for me, but it's good to know.
    Do you have an idea to get ffmpeg to flag it as bff not tff?


    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!