[FFmpeg-user] How to get DVB-Teletxt into MP4

Robin A. Jensen RAJensen at youmail.dk
Sun Feb 9 16:16:30 EET 2020


Den 09-02-2020 kl. 02:19 skrev Reino Wijnsma:
> On 2020-02-09T01:59:53+0100, Robin A. Jensen via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
>> ffmpeg -txt_format text -txt_page 599 -ss 00:04:45 -i 'Beck_ _je for _je (4).ts' -to 00:05:00 -map 0:s:0 -c:s:2 mov_text -metadata:s:2 language=dan 'Beck _je for _je (4).srt'
>> The -txt_page number i get by using VLC. So now i have the .srt file. Don't know how else to get ffmpeg to pick that one subtitle.
>> Then i encode my video as i always do.
>> Then i combine it with:
>> ffmpeg -i 'Beck _je for _je (4).mp4' -i 'Beck _je for _je (4).srt' -c:v copy -c:a copy -c:s mov_text 'test.mp4'
>> This seems to be working. But is a long way to go.
> ffmpeg -ss 00:04:45 -c:v h264_mmal -i 'Beck_ _je for _je (4).ts' -to 00:05:00 -map 0:0 -c:v h264_omx -b:v 4800k -map 0:2 -map 0:3 -c:a copy -map 0:1 -txt_format text -txt_page 599 -c:s mov_text -metadata:s:s language=dan 'Beck Øje for øje (4).mp4'
>
> Wouldn't this work? But again, without a sample we can't verify.
>
> -- Reino
> _______________________________________________
>
> Hey Reino.
> Just a test as you suggestet, but it will create a new error. I correctet the channels that need to be encoded.
ffmpeg -ss 00:04:45 -c:v h264_mmal -i 'Beck_ _je for _je (4).ts' -to 
00:05:00 -map 0:0 -c:v h264_omx -b:v 4800k -map 0:2 -c:a copy -map 0:1 
-txt_format text -txt_page 599 -c:s mov_text -metadata:s:s language=dan 
'Beck _je for _je (4).mp4'
ffmpeg version git-2020-02-08-adea33f Copyright (c) 2000-2020 the FFmpeg 
developers
   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
   configuration: --arch=armhf --enable-gpl --enable-nonfree 
--enable-omx --enable-omx-rpi --enable-mmal --enable-libzvbi
   libavutil      56. 39.100 / 56. 39.100
   libavcodec     58. 68.100 / 58. 68.100
   libavformat    58. 38.100 / 58. 38.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 75.100 /  7. 75.100
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
[h264 @ 0x3579c90] Increasing reorder buffer to 2
[mpegts @ 0x35744d0] start time for stream 4 is not set in 
estimate_timings_from_pts
[mpegts @ 0x35744d0] PES packet size mismatch
[mpegts @ 0x35744d0] Packet corrupt (stream = 2, dts = 3024240201).
[mpegts @ 0x35744d0] PES packet size mismatch
[mpegts @ 0x35744d0] Packet corrupt (stream = 3, dts = 3024240201).
Input #0, mpegts, from 'Beck_ _je for _je (4).ts':
   Duration: 01:42:01.16, start: 27482.817233, bitrate: 9647 kb/s
   Program 7310
     Metadata:
       service_name    : C More Hits
       service_provider: YouSee
     Stream #0:0[0x99c]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 
tbr, 90k tbn, 50 tbc
     Stream #0:1[0x99e](swe,nor,dan,fin): Subtitle: dvb_teletext 
([6][0][0][0] / 0x0006)
     Stream #0:2[0x9a2](dan): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
stereo, fltp, 384 kb/s
     Stream #0:3[0x9a3](nor): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
stereo, fltp, 384 kb/s
   No Program
     Stream #0:4[0x12]: Data: epg
File 'Beck _je for _je (4).mp4' already exists. Overwrite? [y/N] y
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
   Stream #0:2 -> #0:1 (copy)
   Stream #0:1 -> #0:2 (dvb_teletext (libzvbi_teletextdec) -> mov_text 
(native))
Error while opening encoder for output stream #0:2 - maybe incorrect 
parameters such as bit_rate, rate, width or height


More information about the ffmpeg-user mailing list