<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I start a new thread on this topic because the previous one became
long.<br>
<br>
This time as a procedure to convert HDV video and copy MP2 audio to
a DVD-Video compliant MPG file, by applying optional free tools<br>
<br>
=========================================================<br>
HDV to DVD 16x9 video using FFmpeg, DevedeNG and Xorriso<br>
=========================================================<br>
<br>
1) Concatenation hdv clips:<br>
cat hdv01.m2t hdv01_01.m2t hdv01_02.m2t hdv01_03.m2t hdv01_04.m2t
hdv01_05.m2t > HDV01-2007.m2t<br>
<br>
du -sh HDV01-2007.m2t<br>
<blockquote><font face="Courier New, Courier, monospace">12G
HDV01-2007.m2t</font><br>
</blockquote>
<br>
2) Converting HDV video and copying MP2 audio to a DVD-Video
compliant MPG file by applying and customizing a WinFF DVD Widecreen
Video profile <br>
Suggestion to a cleaner output? Some are expected due to joining
unclean clip cuts.<br>
<font face="Courier New, Courier, monospace">But what cause
"Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options
specified for stream 1"?</font><br>
<br>
ffmpeg -hide_banner -i HDV01-2007.m2t -f dvd -target pal-dvd -aspect
16:9 -b:v 8M -maxrate 8M -minrate 8M -bufsize 20M -muxrate 10M -mbd
rd -trellis 1 -cmp 0 -subcmp 2 -c:a copy
dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg<br>
<blockquote><font face="Courier New, Courier, monospace">[mpegts @
0x562aa92c2b80] Could not find codec parameters for stream 2
(Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
[mpegts @ 0x562aa92c2b80] Could not find codec parameters for
stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown
codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
Input #0, mpegts, from 'HDV01-2007.m2t':<br>
Duration: 01:02:20.32, start: 0.440000, bitrate: 26168 kb/s<br>
Program 100 <br>
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<br>
Side data:<br>
cpb: bitrate max/min/avg: 25000000/0/0 buffer size:
7340032 vbv_delay: N/A<br>
Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000
Hz, stereo, fltp, 384 kb/s<br>
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)<br>
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)<br>
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec
options specified for stream 1, only the last option '-c:a copy'
will be used.<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video
(native))<br>
Stream #0:1 -> #0:1 (copy)<br>
Press [q] to stop, [?] for help<br>
Output #0, dvd, to 'dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg':<br>
Metadata:<br>
encoder : Lavf60.16.100<br>
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt709, top
coded first (swapped)), 720x576 [SAR 64:45 DAR 16:9], q=2-31,
8000 kb/s, 25 fps, 90k tbn<br>
Metadata:<br>
encoder : Lavc60.31.102 mpeg2video<br>
Side data:<br>
cpb: bitrate max/min/avg: 9000000/0/8000000 buffer size:
1835008 vbv_delay: N/A<br>
Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 448 kb/s<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
45716400).0.8kbits/s speed=7.25x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 3 25<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 3870 DC, 3870 AC, 3870
MV errors in B frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] PES packet size mismatch<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 1, dts =
45699840).<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
45820800).<br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 85 13<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 4950 DC, 4950 AC, 4950
MV errors in B frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
81907200).8.7kbits/s dup=43 drop=0 speed=6.76x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] timestamp discontinuity
(stream id=2064): -9080000, new offset= 9080000<br>
[mpeg2video @ 0x562aa9522dc0] invalid cbp -1 at 32 11<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 5130 DC, 5130 AC, 5130
MV errors in B frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] PES packet size mismatch<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 1, dts =
81890640).<br>
[aist#0:1/mp2 @ 0x562aa95505c0] timestamp discontinuity (stream
id=2068): -8840000, new offset= 17920000<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
81655200).1.9kbits/s dup=264 drop=0 speed=6.78x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 36 43<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 2250 DC, 2250 AC, 2250
MV errors in I frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
117122400)..0kbits/s dup=287 drop=0 speed=6.78x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpegts @ 0x562aa92c2b80] PES packet size mismatch<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 1, dts =
117113040).<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 66 67<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 73 DC, 73 AC, 73 MV
errors in P frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
122598000)..1kbits/s dup=307 drop=0 speed=6.82x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 53 42<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 2336 DC, 2336 AC, 2336
MV errors in P frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 0, dts =
209030400)..2kbits/s dup=333 drop=0 speed= 6.7x <br>
[in#0/mpegts @ 0x562aa92c2a40] corrupt input packet in stream 0<br>
[mpegts @ 0x562aa92c2b80] PES packet size mismatch<br>
[mpegts @ 0x562aa92c2b80] Packet corrupt (stream = 1, dts =
209014560).<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 10 15<br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 4770 DC, 4770 AC, 4770
MV errors in P frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[mpeg2video @ 0x562aa9522dc0] ac-tex damaged at 35 1035.48
bitrate=8121.7kbits/s dup=353 drop=0 speed=6.74x <br>
[mpeg2video @ 0x562aa9522dc0] Warning MVs not available<br>
[mpeg2video @ 0x562aa9522dc0] concealing 5220 DC, 5220 AC, 5220
MV errors in P frame<br>
[vist#0:0/mpeg2video @ 0x562aa92f2540] corrupt decoded frame<br>
[out#0/dvd @ 0x562aa935bac0] video:3486651kB audio:175455kB
subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 1.736119%<br>
frame=93956 fps=168 q=2.0 Lsize= 3725684kB time=01:02:38.16
bitrate=8121.2kbits/s dup=355 drop=0 speed=6.74x</font><br>
</blockquote>
---------------------<br>
<br>
du -sh dvd*.mpg<br>
<blockquote>3,6G dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg<br>
</blockquote>
<br>
ffprobe -hide_banner dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg<br>
<blockquote><font face="Courier New, Courier, monospace">[mpeg @
0x563adeaee080] start time for stream 0 is not set in
estimate_timings_from_pts<br>
Input #0, mpeg, from 'dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg':<br>
Duration: 01:02:38.24, start: 0.540000, bitrate: 8121 kb/s<br>
Stream #0:0[0x1bf]: Data: dvd_nav_packet<br>
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
bt709, progressive), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25
tbr, 90k tbn<br>
Side data:<br>
cpb: bitrate max/min/avg: 9000000/0/0 buffer size: 1835008
vbv_delay: N/A<br>
Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384
kb/s<br>
Unsupported codec with id 98312 for input stream 0</font><br>
</blockquote>
----------------------------<br>
<br>
3) Creating DVD-Video with DevedeNG<br>
<blockquote><font face="Courier New, Courier, monospace">Add:
dvd_16x9_copy_mp2_ffmpeg_HDV01-2007.mpg and highlight it<br>
Properities > <br>
Misch: check This file is already a DVD suitable MPEG-PS file<br>
keep Use a GOP of 12 frames (compatibility)<br>
Use<br>
Directory location and DVD directory name<br>
Further; Creating DVD structure and iso</font><br>
</blockquote>
<br>
<br>
tree -sh DVD_16x9_copy_mp2_ffmpeg_HDV01-2007<br>
<blockquote><font face="Courier New, Courier, monospace">DVD_16x9_copy_mp2_ffmpeg_HDV01-2007</font><br>
<font face="Courier New, Courier, monospace">├── [3.6G]
DVD_16x9_copy_mp2_ffmpeg_HDV01-2007.iso</font><br>
<font face="Courier New, Courier, monospace">├── [4.0K] dvd_tree</font><br>
<font face="Courier New, Courier, monospace">│ ├── [4.0K]
AUDIO_TS</font><br>
<font face="Courier New, Courier, monospace">│ └── [4.0K]
VIDEO_TS</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 12K]
VIDEO_TS.BUP</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 12K]
VIDEO_TS.IFO</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 32K]
VIDEO_TS.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 18K]
VTS_01_0.BUP</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 18K]
VTS_01_0.IFO</font><br>
<font face="Courier New, Courier, monospace">│ ├── [3.9M]
VTS_01_0.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 32K]
VTS_01_1.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 48K]
VTS_02_0.BUP</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 48K]
VTS_02_0.IFO</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 32K]
VTS_02_0.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [1024M]
VTS_02_1.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [1024M]
VTS_02_2.VOB</font><br>
<font face="Courier New, Courier, monospace">│ ├── [1024M]
VTS_02_3.VOB</font><br>
<font face="Courier New, Courier, monospace">│ └── [566M]
VTS_02_4.VOB</font><br>
<font face="Courier New, Courier, monospace">├── [4.0K] menu</font><br>
<font face="Courier New, Courier, monospace">│ ├── [2.9K]
menu_0_active_bg.png</font><br>
<font face="Courier New, Courier, monospace">│ ├── [ 62K]
menu_0_bg.png</font><br>
<font face="Courier New, Courier, monospace">│ ├── [3.9M]
menu_0B.mpg</font><br>
<font face="Courier New, Courier, monospace">│ ├── [3.9M]
menu_0.mpg</font><br>
<font face="Courier New, Courier, monospace">│ ├── [2.9K]
menu_0_selected_bg.png</font><br>
<font face="Courier New, Courier, monospace">│ ├── [1.7K]
menu_0_unselected_bg.png</font><br>
<font face="Courier New, Courier, monospace">│ └── [ 484]
menu_0.xml</font><br>
<font face="Courier New, Courier, monospace">├── [4.0K] movies</font><br>
<font face="Courier New, Courier, monospace">│ └── [3.6G]
movie_0.mpg</font><br>
<font face="Courier New, Courier, monospace">└── [4.0K] xml_data</font><br>
<font face="Courier New, Courier, monospace"> └── [1.9K]
dvdauthor.xml</font><br>
<br>
</blockquote>
--------------------------------<br>
<br>
Testing playback OK<br>
<br>
ffplay -hide_banner
/home/terje/Videoklipp/M2T-MOV/DVD_16x9_copy_mp2_ffmpeg_HDV01-2007/movies/movie_0.mpg<br>
<blockquote><font face="Courier New, Courier, monospace">[mpeg @
0x7fbfd8000cc0] start time for stream 0 is not set in
estimate_timings_from_pts<br>
Input #0, mpeg, from
'/home/terje/Videoklipp/M2T-MOV/DVD_16x9_copy_mp2_ffmpeg_HDV01-2007/movies/movie_0.mpg':<br>
Duration: 01:02:38.24, start: 0.540000, bitrate: 8121 kb/s<br>
Stream #0:0[0x1bf]: Data: dvd_nav_packet<br>
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
bt709, progressive), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25
tbr, 90k tbn<br>
Side data:<br>
cpb: bitrate max/min/avg: 9000000/0/0 buffer size: 1835008
vbv_delay: N/A<br>
Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384
kb/s<br>
20.67 A-V: -0.006 fd= 0 aq= 47KB vq= 1209KB sq= 0B
f=0/0 </font><br>
</blockquote>
<br>
---------------<br>
<br>
cd
/home/terje/Videoklipp/M2T-MOV/DVD_16x9_copy_mp2_ffmpeg_HDV01-2007<br>
ls<br>
DVD_16x9_copy_mp2_ffmpeg_HDV01-2007.iso
DVD_16x9_copy_mp2_ffmpeg_HDV01-2007.iso dvd_tree menu movies
xml_data<br>
<br>
4) Burning the iso to a DVD+RW disk<br>
<br>
xorriso -as cdrecord -v -sao dev=/dev/sr1
DVD_16x9_copy_mp2_ffmpeg_HDV01-2007.iso<br>
<blockquote>xorriso 1.4.6 : RockRidge filesystem manipulator,
libburnia project.<br>
Drive current: -outdev '/dev/sr1'<br>
Media current: DVD+RW<br>
Media status : is blank<br>
Media summary: 0 sessions, 0 data blocks, 0 data, 4483m free<br>
Beginning to write data track.<br>
xorriso : UPDATE : Formatting. Working since 0 seconds<br>
xorriso : UPDATE : Formatting. Working since 1 seconds<br>
xorriso : UPDATE : Formatting. Working since 2 seconds<br>
xorriso : UPDATE : Formatting. Working since 3 seconds<br>
xorriso : UPDATE : Formatting. Working since 4 seconds<br>
libburn : NOTE : Write start address is 0 * 2048<br>
xorriso : UPDATE : 0 of 3643 MB written (fifo 99%) [buf 0%]
0.0x.<br>
xorriso : UPDATE : 0 of 3643 MB written (fifo 99%) [buf 0%]
0.0x.<br>
xorriso : UPDATE : 0 of 3643 MB written (fifo 99%) [buf 0%]
0.4x.<br>
xorriso : UPDATE : 0 of 3643 MB written (fifo 99%) [buf 0%]
0.0x.<br>
xorriso : UPDATE : 6 of 3643 MB written (fifo 97%) [buf 99%]
4.1x.<br>
..........<br>
xorriso : UPDATE : 3621 of 3643 MB written (fifo 97%) [buf 99%]
4.0x.<br>
xorriso : UPDATE : 3626 of 3643 MB written (fifo 97%) [buf 99%]
4.0x.<br>
xorriso : UPDATE : 3631 of 3643 MB written (fifo 98%) [buf 99%]
4.0x.<br>
xorriso : UPDATE : 3637 of 3643 MB written (fifo 99%) [buf 99%]
4.0x.<br>
xorriso : UPDATE : 3642 of 3643 MB written (fifo 19%) [buf 99%]
4.0x.<br>
xorriso : UPDATE : Closing track/session. Working since 709
seconds<br>
xorriso : UPDATE : Closing track/session. Working since 710
seconds<br>
xorriso : UPDATE : Closing track/session. Working since 711
seconds<br>
xorriso : UPDATE : Closing track/session. Working since 712
seconds<br>
Writing to '/dev/sr1' completed successfully.<br>
<br>
xorriso : NOTE : Re-assessing -outdev '/dev/sr1'<br>
Drive current: -outdev '/dev/sr1'<br>
Media current: DVD+RW<br>
Media status : is written , is appendable<br>
Media summary: 1 session, 1865398 data blocks, 3643m data, 839m
free<br>
</blockquote>
------------------<br>
<br>
Tested the DVD-Video disk playback ok in a DVD standalone player and
ditto BD player.<br>
<br>
Visual impression:<br>
HDV down-conversion (oversampling) to 16x9 DVD-Video results in
noticeable better quality than former DV source.<br>
<br>
<br>
</body>
</html>