[FFmpeg-user] Question about conversion (Transcoding)

JD jd1008 at gmail.com
Tue Sep 18 22:26:00 EEST 2018



On 09/18/2018 12:53 PM, Carl Eugen Hoyos wrote:
> 2018-09-18 18:50 GMT+02:00, JD <jd1008 at gmail.com>:
>> I have an mpeg2 file which I am trying to convert to a dvd iso.
>>
>> I am using dvdauthor to do it.
>> dvdauthor says the file is not mpeg2 video compatible.
>>
>> When I run ffprobe on the file, I get this
>>
>> ffprobe /usr/tmp/title_3-09h31m23s.mpg
>> ffprobe version N-51556-ge278500 Copyright (c) 2007-2013 the FFmpeg
>> developers
>>     built on Apr  4 2013 05:11:43 with gcc 4.6 (Debian 4.6.3-1)
>>     configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32
>> --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static'
>> --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static'
>> --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static
>> --disable-shared --disable-ffserver --disable-doc --enable-bzlib
>> --enable-zlib --enable-postproc --enable-runtime-cpudetect
>> --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis
>> --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype
>> --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc
>> --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
>>     libavutil      52. 24.100 / 52. 24.100
>>     libavcodec     55.  2.100 / 55.  2.100
>>     libavformat    55.  1.100 / 55.  1.100
>>     libavdevice    55.  0.100 / 55.  0.100
>>     libavfilter     3. 49.100 /  3. 49.100
>>     libswscale      2.  2.100 /  2.  2.100
>>     libswresample   0. 17.102 /  0. 17.102
>>     libpostproc    52.  2.100 / 52.  2.100
>> [mpeg @ 0xab1d7c0] max_analyze_duration 5000000 reached at 5024000
>> microseconds
>> [mpeg @ 0xab1d7c0] Could not find codec parameters for stream 1 (Audio:
>> ac3, 0 channels): unspecified sample format
>> Consider increasing the value for the 'analyzeduration' and 'probesize'
>> options
>> [NULL @ 0xab1e760] start time is not set in estimate_timings_from_pts
>> Input #0, mpeg, from '/usr/tmp/title_3-09h31m23s.mpg':
>>     Duration: 02:10:42.11, start: 45337.301611, bitrate: 5391 kb/s
>>       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR
>> 32:27 DAR 16:9], 29.97 fps, 59.92 tbr, 90k tbn, 59.94 tbc
>>       Stream #0:1[0x20]: Audio: ac3, 0 channels
>>       Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
>>
>> So, how do I convert this file to a DVD compatible mpeg2 file?
> Please try the following:
> $ ffmpeg -i title_3-09h31m23s.mpg -target ntsc-dvd -acodec copy out.mpg
>
> If it does not work, you can try to remove "-acodec copy".
>
> Note that all dvd players I have seen also play the resulting
> mpg file if I simply put it on a dvd (without using dvdauthor).
>
> You could also test with "-acodec copy -vcodec copy" to
> maximize quality.
>
> Carl Eugen
Hi Carl,
Thank you for the tip.
I am getting the following output from ffmpeg:
seems to indicate some problem with my mpg file!!!
Notice that output file has -V2 in it's name
to indicate that it is version 2.


ffmpeg -i /usr/tmp/title_3-09h31m23s.mpg -target ntsc-dvd -acodec copy 
-vcodec copy /usr/tmp/title_3-09h31m23s-V2.mpg
ffmpeg version N-88150-gae100046ca-static 
https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg 
developers
   built with gcc 6.4.0 (Debian 6.4.0-8) 20171010
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gray --enable-libfribidi --enable-libass 
--enable-libvmaf --enable-libfreetype --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-librubberband --enable-librtmp 
--enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus 
--enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc 
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --enable-libzimg
   libavutil      56.  0.100 / 56.  0.100
   libavcodec     58.  0.100 / 58.  0.100
   libavformat    58.  0.100 / 58.  0.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  0.100 /  7.  0.100
   libswscale      5.  0.100 /  5.  0.100
   libswresample   3.  0.100 /  3.  0.100
   libpostproc    55.  0.100 / 55.  0.100
[mpeg @ 0x48a3e80] start time for stream 1 is not set in 
estimate_timings_from_pts
[mpeg @ 0x48a3e80] Could not find codec parameters for stream 1 (Audio: 
ac3, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
Input #0, mpeg, from '/usr/tmp/title_3-09h31m23s.mpg':
   Duration: 02:10:42.14, start: 45337.301611, bitrate: 5391 kb/s
     Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
smpte170m, top first), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, 
29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x20]: Audio: ac3, 0 channels
     Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
[dvd @ 0x48ab2e0] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size 
<<<<<< ??????
Output #0, dvd, to '/usr/tmp/title_3-09h31m23s-V2.mpg':
   Metadata:
     encoder         : Lavf58.0.100
     Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, smpte170m, top 
first), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 6000 kb/s, 29.97 fps, 
59.94 tbr, 90k tbn, 29.97 tbc
     Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[dvd @ 0x48ab2e0] Timestamps are unset in a packet for stream 0. This is 
deprecated and will stop working in the future. Fix your code to set the 
timestamps properly
[dvd @ 0x48ab2e0] Non-monotonous DTS in output stream 0:0; previous: 
8882356, current: 8881224; changing to 8882357. This may result in 
incorrect timestamps in the output file.
[dvd @ 0x48ab2e0] buffer underflow st=1 bufi=638 size=1792
frame=23976 fps=412 q=-1.0 size=  684302kB time=00:16:40.87 
bitrate=5600.9kbits/s speed=17.2x




More information about the ffmpeg-user mailing list