[FFmpeg-user] FFMPEG - Encoding video changes sounds and subtitles tracks names, and make them invisible for SmartTV / Chromecast

Quentin MORRIER qmorrier at hotmail.com
Tue May 7 11:57:29 EEST 2019


INTRODUCTION:
-------------
I'm regularly recording movies on french channels, via a functionality of my NAS.
The resulting files are ***.ts** (I suppose the program behind is ffmpeg or vlc, but can't be sure).

Those records contain multi-lang and subtitles, and any of my players (tv, chromecast, vlc android or win) can see all the channels with the correct names (like french subtitles, french or VO sound tracks etc..).

Then I'm using ffpmeg to cut the advertising, by extracting the desired parts, and merging them via a concat command.
Here are the commands I'm using:

Extract:

    ffmpeg.exe -loglevel info -i $SOURCE -ss $TIME_START -t $TIME_DURATION -c copy -map 0 -ignore_unknown -y $CHUNK_DESTINATION

Concat files:

    ffmpeg.exe -loglevel info -f concat -safe 0 -i $FFMPEG_LIST_FILE -c copy -map 0 -c:v libx264 -c:a aac -ignore_unknown -y $DESTINATION

Up to now, I've been using the static build **ffmpeg-3.0.1-win64-static** for windows, and everything worked like a charm.

PROBLEM:
--------
Recently, mainly for saving space on my NAS, I decided to switch the video codec to **libx265**. So I had to update the ffmpeg build to the last version available: **ffmpeg-4.1.3-win64-static**.

Then my concat command changes to:

    ffmpeg.exe -loglevel info -f concat -safe 0 -i $FFMPEG_LIST_FILE -c copy -map 0 -c:v libx265 -c:a aac -ignore_unknown -y $DESTINATION

My problem is that as soon as I use the newer versions of ffmpeg (above 4.*, I tried several intermediate), the conversion process change the name of the channels (sound and subtitles), and most of my players (Smart TV, chromecast) doesn't see the subtitles anymore.

It happens independently of the video codec. I tried **libx264** and **libx265**, and also different container: I tried with **mkv**, **mp4** and **ts**).

I tried with the explicit "subtitle copy" option of ffmpeg, to be sure it's not trying to convert/re-encode, but without any effect.

I also tried to first cut/concat the movie with the old **ffmpeg-3.0.1-win64-static** with libx264, and then convert to h265 with the new version **ffmpeg-4.1.3-win64-static** and the command:

    ffmpeg.exe -loglevel info -i "The Revenant (2015).ts" -c copy -map 0 -c:v libx265 -c:a aac -ignore_unknown -y "The Revenant (2015) h265.ts"


Here are the ffprobe infos for each version, and they are pretty similar..:

    The Revenant (2015).ts (ffmpeg-3.0.1-win64-static / h264):
    ----------------------------------------------------------
    ffprobe version 4.1.3 Copyright (c) 2007-2019 the FFmpeg developers
      built with gcc 8.3.1 (GCC) 20190414
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    [mpegts @ 000002b515a5c700] start time for stream 5 is not set in estimate_timings_from_pts
    Input #0, mpegts, from 'C:/zzzz_films_converted/Copi├®/The Revenant (2015).ts':
      Duration: 02:21:59.18, start: 1.400000, bitrate: 3830 kb/s
      Program 1
        Metadata:
          service_name    : Service01
          service_provider: FFmpeg
        Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
        Stream #0:1[0x101](fre): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 134 kb/s
        Stream #0:2[0x102](qad): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 149 kb/s
        Stream #0:3[0x103](qaa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 132 kb/s
        Stream #0:4[0x104](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
        Stream #0:5[0x105](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)


    The Revenant (2015) h265.ts (ffmpeg-4.1.3-win64-static / h264):
    ---------------------------------------------------------------
    ffprobe version 4.1.3 Copyright (c) 2007-2019 the FFmpeg developers
      built with gcc 8.3.1 (GCC) 20190414
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    [mpegts @ 0000027d31b3c700] start time for stream 5 is not set in estimate_timings_from_pts
    Input #0, mpegts, from 'C:/zzzz_films_converted/Copi├®/The Revenant (2015) h265.ts':
      Duration: 02:21:59.22, start: 1.400000, bitrate: 1719 kb/s
      Program 1
        Metadata:
          service_name    : Service01
          service_provider: FFmpeg
        Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 25 tbc
        Stream #0:1[0x101](fre): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 136 kb/s
        Stream #0:2[0x102](qad): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 137 kb/s
        Stream #0:3[0x103](qaa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
        Stream #0:4[0x104](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
        Stream #0:5[0x105](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)




I've googled a lot, but cannot find any similar problem.

I can provide the video files presented here for **testing purpose only**...

Thanks for having read this endless post :)


PS: I've posted this question as well on Super User:
https://superuser.com/questions/1433894/ffmpeg-encoding-video-changes-sounds-and-subtitles-tracks-names-and-make-them


Kind regards,

Quentin MORRIER


More information about the ffmpeg-user mailing list