[FFmpeg-user] AVC3 -> AVC1 conversion

DopeLabs dopelabs at dubstep.fm
Tue Nov 28 13:21:32 EET 2017


the same thing happens by default when using ffmpeg to encode hevc/x265

ffmpeg creates an hevc format mp4 with a default fourcc of hev1, which osx will not play via quicktime, finder/quicklook. preview thumbnails/file icons also do not generate in finder.

changing the fourcc to hvc1 will make it work across osx in the above mentioned areas...

here is the command i used. you may apply the same methods with x264 with -tag:v avc1

$ ffmpeg -i x265.mp4 -c copy -tag:v hvc1 hvc1.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'x265.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf57.76.100
  Duration: 00:41:50.01, start: 0.000000, bitrate: 348 kb/s
    Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 1920x1080, 211 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Output #0, mp4, to 'hvc1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.2.100
    Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 1920x1080, q=2-31, 211 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): 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
frame=75300 fps=14676 q=-1.0 Lsize=  106784kB time=00:41:49.98 bitrate= 348.5kbits/s speed= 489x
video:64898kB audio:39220kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 2.560526%



> On Nov 27, 2017, at 2:26 54PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 
> 2017-11-26 23:27 GMT+01:00 antony baxter <antony.baxter at gmail.com>:
> 
>> I can obviously convert them into H264 avc1 the long way, but
>> wondered if there was a quick way of simply changing the
>> metadata of the avc3 stream into avc1?
> 
> Of course:
> Use the hexeditor of your choice, search for "avc3" (it is either
> on top or at the end of the file) and change it.
> 
> I am not sure if QT (or WMP) will play the resulting file though,
> FFmpeg-based players will.
> 
> As Moritz explained: FFmpeg is not a file editor.
> 
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://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