[FFmpeg-user] DV to SD Blu-ray

Terje J. Hanssen terje at nordland-teknikk.no
Tue Jan 24 00:01:06 EET 2017


Den 23. jan. 2017 14:59, skrev Carl Eugen Hoyos:
> 2017-01-23 3:14 GMT+01:00 Terje J. Hanssen <terje at nordland-teknikk.no>:
>
>> So far I have therefore given up to get pcm audio muxed into .m2ts
>> for a working Blu-ray video.
> Just to avoid a misunderstanding:
>  From FFmpeg's pov, "pcm" and "pcm-bluray" are two completely
> different things like - for example - h264 and vp8; and on this
> mailing list only FFmpeg's pov makes sense imo.
> Muxing pcm in mpegts in impossible, this is not a limitation of FFmpeg.
> Muxing pcm-bluray (and bluray subtitles) in mpegts is also impossible
> with FFmpeg, this is ticket #2622.
>
> More important though imo:
> Were you able to mux anything (audio or video) into mpegts and get
> something that is Blu-ray-compatible? I had expected that this is the
> difficult part and  that it will be easy to add pcm-bluray muxing (and
> pcm-bluray encoding) once bluray muxing is supported.
>
> If your Samsung accepts both Bluray and random (dvb) mpegts (which
> doesn't support pcm-bluray, again no limitation of FFmpeg) then the
> difference will of course be hard to see for you;-(
>
>
My first priority and focus here is to get basic playback of video 
formats burned to Blu-ray UDF "data discs" for archive using a Blu-ray 
player (UBD-K8500). This includes basic playback functionality (i.e 
skip) or browse file structure with the remote.
My thought is that if "compliant .m2ts" playback works from "data disc", 
there is a reasonable chance next they also can work using a Blu-ray 
video BDMV structure. I just expect this also offer more advanced 
features, though this is not critical for archive of "intermediate 
source" format .

And yes, I have tested that both DV video transcoded with x264 and HDV 
mpeg2 video copied pass-through each playback ok as m2ts when the 
respective pcm and mp2 audio formats are transcoded to AC3 (FFplay, VLC, 
BR-player).


1) 576i DV video to x264, pcm audio to ac3

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 
ac3 -strict experimental -ar 48000 -ab 256k -y
SD_BD2_x264_ac3.m2ts

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 @ 0xa93880] using SAR=12/11
[libx264 @ 0xa93880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xa93880] profile High, level 4.1
Output #0, mpegts, to 'SD_BD2_x264_ac3.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: ac3, 48000 Hz, stereo, fltp, 256 kb/s
     Metadata:
       encoder         : Lavc57.64.100 ac3
Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (pcm_s16le (native) -> ac3 (native))


ffprobe SD_BD2_x264_ac3.m2ts

Input #0, mpegts, from 'SD_BD2_x264_ac3.m2ts':
   Duration: 00:09:56.49, start: 1.474667, bitrate: 8976 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]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 
stereo, fltp, 256 kb/s


2) 1080i HDV.m2t meg2 video copy, mp2 audio to ac3

ffmpeg -i hdv01_05.m2t -vcodec copy -acodec ac3 HDV-BD_m2t_ac3.m2ts

[mpeg2video @ 0x109fd40] Invalid frame dimensions 0x0.
     Last message repeated 2 times
[mpegts @ 0x109b400] Could not find codec parameters for stream 2 
(Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0x109b400] Could not find codec parameters for stream 3 
(Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
Input #0, mpegts, from 'hdv01_05.m2t':
   Duration: 00:07:38.74, start: 3282.024000, bitrate: 26123 kb/s
   Program 100
     Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] / 
0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 
25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 384 kb/s
     Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
     Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)
Output #0, mpegts, to 'HDV-BD_m2t_ac3.m2ts':
   Metadata:
     encoder         : Lavf57.56.100
     Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), 
yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 
25000 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc
     Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
     Metadata:
       encoder         : Lavc57.64.100 ac3
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (mp2 (native) -> ac3 (native))


ffprobe HDV-BD_m2t_ac3.m2ts

Input #0, mpegts, from 'HDV-BD_m2t_ac3.m2ts':
   Duration: 00:07:38.74, start: 1.400000, bitrate: 27740 kb/s
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 
0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 
25000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 
stereo, fltp, 192 kb/s


du -sh SD* HDV* dv01.dv hdv01_05.m2t
639M    SD_BD2_x264_ac3.m2ts
668M    SD-BD2_x264.mkv
738M    SD-BD_x264.m2ts
1,5G    HDV-BD_m2t_ac3.m2ts
2,0G    dv01.dv
1,4G    hdv01_05.m2t


Terje H.


More information about the ffmpeg-user mailing list