[FFmpeg-user] DV to SD Blu-ray

Terje J. Hanssen terje at nordland-teknikk.no
Thu Jan 19 20:19:57 EET 2017


Hi List,

I'm a new user here and want suggestions for "best" ffmpeg syntax to 
transcode PAL 576i DV source files to compliant SD-BD_x264m2ts and/or 
SD-BD_mpeg2.m2ts.
The AVCHD-SD specification is possibly something that could be used
https://en.wikipedia.org/wiki/AVCHD#Specifications

My purpose is to
- archive this on 25GB-50GB BD-R discs in an suited format for future 
editing
- keep the source quality at relative high bit-rate (i.e AVC at 15 Mbps 
or MPEG-2 (I-frame?) at 25 Mbps)
- playback compliance with BD-players.
- keep by copy the DV LPCM audio if possible.


The closest samples as references I've found for encoding Blu-ray are these:

1) with x264 (video only)
http://www.x264bluray.com/home/576i-pal

2) with ffmpeg
http://forum.videohelp.com/threads/365667-FFmpeg-best-settings-to-encode-Blu-Ray?p=2332049&viewfull=1#post2332049

I want suggestions how to possibly "merge" relevant parameters from 1) 
x264 into 2) ffmpeg syntax ?


3) As a first attempt I tried to apply 2) mostly as is, but didn't 
succeed to get LPCM audio copied:
ffplay and VLC can playback the out video file SD-BD_x264.m2ts without 
Audio.


ffmpeg -i dv01.dv -c:v libx264 -profile:v high -level 41 -pix_fmt 
yuv420p -preset slow  -crf 20 -g 24 -vf setsar=sar=12/11 -threads 8 
-x264opts bluray-compat=1:vbv-bufsize=15000:vbv-maxrate=30000 -acodec 
copy -strict experimental -ar 48000 -ab 256k -y SD-BD_x264.m2ts
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.8 (SUSE Linux)
...............
Input #0, dv, from 'dv01.dv':
   Metadata:
     timecode        : 00:00:00:00
   Duration: 00:09:56.48, start: 0.000000, bitrate: 28800 kb/s
     Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 
25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
     Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[libx264 @ 0xd90880] using SAR=12/11
[libx264 @ 0xd90880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xd90880] profile High, level 4.1
Output #0, mpegts, to 'SD-BD_x264.m2ts':
   Metadata:
     timecode        : 00:00:00:00
     encoder         : Lavf57.56.100
     Stream #0:0: Video: h264 (libx264), yuv420p, 720x576 [SAR 12:11 DAR 
15:11], q=-1--1, 25 fps, 90k tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.64.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 30000000/0/0 buffer size: 15000000 
vbv_delay: -1
     Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=14912 fps= 53 q=-1.0 Lsize=  755397kB time=00:09:56.44 
bitrate=10375.2kbits/s speed=2.14x
video:571865kB audio:111840kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 10.485744%
[libx264 @ 0xd90880] frame I:720   Avg QP:20.31  size: 88271
[libx264 @ 0xd90880] frame P:5311  Avg QP:23.17  size: 46922
[libx264 @ 0xd90880] frame B:8881  Avg QP:25.88  size: 30721
[libx264 @ 0xd90880] consecutive B-frames: 18.9%  1.8%  9.8% 69.5%
[libx264 @ 0xd90880] mb I  I16..4:  1.9% 94.2%  4.0%
[libx264 @ 0xd90880] mb P  I16..4:  2.0% 25.2%  1.8%  P16..4: 31.9% 
22.9% 12.0%  0.0%  0.0%    skip: 4.2%
[libx264 @ 0xd90880] mb B  I16..4:  0.1%  4.1%  0.2%  B16..8: 41.4% 
15.3%  5.5%  direct:28.1%  skip: 5.3%  L0:32.7% L1:32.0% BI:35.4%
[libx264 @ 0xd90880] 8x8 transform intra:90.0% inter:75.5%
[libx264 @ 0xd90880] direct mvs  spatial:100.0% temporal:0.0%
[libx264 @ 0xd90880] coded y,uvDC,uvAC intra: 94.3% 90.6% 51.5% inter: 
72.2% 67.9% 7.9%
[libx264 @ 0xd90880] i16 v,h,dc,p: 27% 60%  8%  5%
[libx264 @ 0xd90880] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 14% 24%  6% 8%  
7%  8%  8% 12%
[libx264 @ 0xd90880] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6% 60%  3%  4% 5%  
4%  6%  4%  8%
[libx264 @ 0xd90880] i8c dc,h,v,p: 41% 26% 16% 17%
[libx264 @ 0xd90880] Weighted P-Frames: Y:13.6% UV:5.8%
[libx264 @ 0xd90880] ref P L0: 64.2% 21.1% 11.6%  3.1%
[libx264 @ 0xd90880] ref B L0: 91.4%  8.6%
[libx264 @ 0xd90880] ref B L1: 92.7%  7.3%
[libx264 @ 0xd90880] kb/s:7853.94


4)
ffprobe SD-BD_x264.m2ts
................
Input #0, mpegts, from 'SD-BD_x264.m2ts':
   Duration: 00:09:56.48, start: 1.480000, bitrate: 10374 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), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 25 tbr, 90k 
tbn, 50 tbc
     Stream #0:1[0x101]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 100359 for input stream 1


------------
Thanks,
Terje Hanssen



More information about the ffmpeg-user mailing list