[FFmpeg-user] converting mp4 to ts [8k]

Stanisław Artymowski stanislaw.artymowski at gmail.com
Fri Jun 14 13:28:37 EEST 2019


Ok, I have to admit that my post wasn't clear.

But meanwhile I was able to to run this command:
ffmpeg -i input.mp4 -c copy -muxrate 120M -f mpegts
-mpegts_service_type 0x80 output.ts and I haven't got any warnings.
The output is below:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2018-09-21T06:17:20.000000Z
  Duration: 00:02:25.49, start: 0.000000, bitrate: 80392 kb/s
    Stream #0:0(eng): Video: hevc (Main 10) (hvc1 / 0x31637668),
yuv420p10le(pc, bt709), 7680x4320 [SAR 1:1 DAR 16:9], 80277 kb/s,
29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2018-09-21T06:17:20.000000Z
      handler_name    : Alias Data Handler
      encoder         : HEVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2018-09-21T06:17:20.000000Z
      handler_name    : Alias Data Handler
Output #0, mpegts, to 'output.ts':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf57.83.100
    Stream #0:0(eng): Video: hevc (Main 10) (hvc1 / 0x31637668),
yuv420p10le(pc, bt709), 7680x4320 [SAR 1:1 DAR 16:9], q=2-31, 80277
kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2018-09-21T06:17:20.000000Z
      handler_name    : Alias Data Handler
      encoder         : HEVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2018-09-21T06:17:20.000000Z
      handler_name    : Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   62 fps=0.0 q=-1.0 size=   31744kB time=00:00:01.98
bitrate=131072.0kbitframe=  373 fps=346 q=-1.0 size=  186368kB
time=00:00:12.34 bitrate=123664.9kbitframe=  722 fps=457 q=-1.0 size=
355328kB time=00:00:24.02 bitrate=121177.6kbitframe= 1057 fps=508
q=-1.0 size=  517376kB time=00:00:35.16 bitrate=120515.4kbitframe=
1370 fps=530 q=-1.0 size=  666624kB time=00:00:45.61
bitrate=119726.3kbitframe= 1673 fps=542 q=-1.0 size=  817408kB
time=00:00:55.72 bitrate=120170.9kbitframe= 1952 fps=544 q=-1.0 size=
954624kB time=00:01:05.04 bitrate=120228.1kbitframe= 2223 fps=544
q=-1.0 size= 1087232kB time=00:01:14.07 bitrate=120239.3kbitframe=
2540 fps=553 q=-1.0 size= 1240576kB time=00:01:24.65
bitrate=120054.9kbitframe= 2852 fps=560 q=-1.0 size= 1396480kB
time=00:01:35.08 bitrate=120316.0kbitframe= 3157 fps=564 q=-1.0 size=
1542656kB time=00:01:45.23 bitrate=120083.8kbitframe= 3514 fps=576
q=-1.0 size= 1718016kB time=00:01:57.15 bitrate=120136.1kbitframe=
3840 fps=582 q=-1.0 size= 1875968kB time=00:02:08.02
bitrate=120035.8kbitframe= 4172 fps=587 q=-1.0 size= 2041088kB
time=00:02:19.13 bitrate=120174.5kbitframe= 4359 fps=587 q=-1.0 Lsize=
2136053kB time=00:02:25.42 bitrate=120323.4kbits/s speed=19.6x
video:1425285kB audio:2226kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 49.634842%


About your question about working ts even with warnings - it's not
that simple. let's say that it's not working proper.

2019-06-14 11:07 GMT+02:00, Moritz Barsnick <barsnick at gmx.net>:
> On Fri, Jun 14, 2019 at 10:12:11 +0200, Stanisław Artymowski wrote:
>> I used -c copy, because I want to have same codec and I used muxrate
>
> It's not just "the same codec", it's the identical stream, without
> re-encoding.
>
>> 80M so I will be able to have CBR 80M.
>> but I am getting "dts < pcr, TS is invalid" warning all the time, and
>> I don't know how to handle it.
>
> Since it's a warning: Does the output file work correctly nevertheless?
>
>> Now I am trying to run above command but I added "-b:v 80M -maxrate
>> 80M -bufsize 80M" - then converting tooks really long and at some
>> point I am still getting the warning.
>
> So you dropped "-c:v copy"?
>
>> Can someone walk with me through this and point me the solution? What
>> am I missing?
>
> Kindly show us the complete actually used command line, and ffmpegs
> full. uncut console output (without changing the loglevel or using
> "-hide_banner"). If you are getting too many "dts < pcr, TS is
> invalid", you can cut away the middle part with the duplicated info.
> But the intro is important, and all of the summary.
>
> Thanks,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list