Re: encoding mp4 to mpeg2 DVD format

JD <[email protected]>
Newsgroups gmane.comp.video.mjpeg.user
Message-ID <[email protected]>
On 09/28/2012 11:03 PM, Bernhard Praschinger wrote:
> Hallo
>
> mpeg2enc cannot transcode this way.
> You need some other program to generate the yuv4mpeg format, mplayer 
> for example can do this for you. In the mjpegtools wiki is a short 
> howto: 
> http://sourceforge.net/apps/mediawiki/mjpeg/index.php?title=Creating_videos_from_other_sources 
>
>
> > mkfifo stream.yuv
> > cat stream.yuv | mpeg2enc -f 8 -o video.m2v &
> > mplayer -nosound -noframedrop -vo yuv4mpeg yourfile.mp4
>
> The thing slightly missing is the audio decoding/ encoding:
> > mplayer -vo null -ao pcm:fast Video_12.mp4
> > cat audiodump.wav | mp2enc -r 48000 -o audio.mp2
>
> and than mplex it together with:
> > mplex -f 8 audio.mp2 video.m2v -o reencoded.mpg
>
> the last step is running dvdauthor.
>
> auf hoffentlich bald,
>
> Berni the Chaos of Woodquarter
>
> Email: [email protected]
> www: http://www.lysator.liu.se/~gz/bernhard
>
Hi Barnhard,

Well after a few hours of running the script:
#!/bin/ksh
[ $# -lt 2 ] && echo 'Usage: $0 <file.mp4> <file.mpg>' && exit 1
mkfifo stream.yuv
cat stream.yuv | mpeg2enc -f 8 -o video.m2v &
mplayer -nosound -noframedrop -vo yuv4mpeg $1

# The thing slightly missing is the audio decoding/ encoding:
mplayer -vo null -ao pcm:fast $1
cat audiodump.wav | mpeg2enc -r 48000 -o audio.mp2

# and than mplex it together with:
mplex -f 8 audio.mp2 video.m2v -o $2


it ended with the following error messages:

Playing /sdb4/Misc/Media/Jesus_Christ_SuperStar.mp4.
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  450x360  24bpp  25.000 fps  379.7 kbps (46.4 kbyte/s)
Clip info:
  major_brand: mp42
  minor_version: 0
  compatible_brands: isommp42
  creation_time: 2012-08-26 15:53:18
Load subtitles in /sdb4/Misc/Media/
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 11999->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -benchmark -vc null -vo 
null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Movie-Aspect is undefined - no prescaling applied.
VO: [null] 450x360 => 450x360 Planar YV12
A:   2.6 V:   2.3 A-V:  0.281 ct:  0.040   0/  0 11%  0% 0.8% 53 0


            ************************************************
            **** Your system is too SLOW to play this!  ****
            ************************************************

/> the SLOW message is strange as mplayer has no problems playing this 
mp4 file!/

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
   - Try -ao sdl or use the OSS emulation of ALSA.
   - Experiment with different values for -autosync, 30 is a good start.


    Exiting... (End of file)
    **ERROR: [mpeg2enc] -r option requires arg 0 .. 32

    INFO: [mplex] mplex version 2.0.0 (2.2.7 $Date: 2010/03/13 13:05:07 $)
    **ERROR: [mplex] Unable to open file audio.mp2 for reading.


------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.