Opened 15 years ago
Last modified 14 years ago
#1631 new defect
Incorrect yuv4mpeg:file output
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | vo |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
I use the following bash script to convert video:
#!/bin/bash
#mkfifo /home/ilya/video.y4m
shopt -s extglob
for g in +(*.mkv|*.avi|*.mp4)
do x264 -p 1 -o "${g%.*}.flv" /home/ilya/video.y4m -B 600 --threads 2 --trellis 0 --b-pyramid normal --b-adapt 0 --aud --colormatrix bt709 --colorprim bt709 --fullrange on --no-fast-pskip --no-dct-decimate --no-psy --subme 8 --me umh --weightp 2 --direct spatial -A all -r 3 -b 2 --slow-firstpass & mplayer -nofs -vc xvid,ffh264, -xvidopts deblock-chroma:deblock-luma -noframedrop -autosub -sid 0 -sub-fuzziness 1 -vo yuv4mpeg:file=/home/ilya/video.y4m -ass -embeddedfonts -ass-line-spacing -3 -ass-font-scale 0.8 -ass-styles /home/ilya/Video/rutube/style/styles.ass -ass-force-style MarginV=3 -fontconfig -subfont-autoscale 3 -sws 9 -vf format=yv12,scale=960:540:::4:::1:1,expand=::::1:4/3 -noslices -subcp enca:ru:CP1251 -nosound "$g"
wait
x264 -p 2 -o "${g%.*}.flv" /home/ilya/video.y4m -B 600 --threads 2 --trellis 0 --b-pyramid normal --b-adapt 0 --aud --colormatrix bt709 --colorprim bt709 --fullrange on --no-fast-pskip --no-dct-decimate --no-psy --subme 8 --me umh --weightp 2 --direct spatial -A all -r 3 -b 2 --slow-firstpass & mplayer -nofs -vc xvid,ffh264, -xvidopts deblock-chroma:deblock-luma -noframedrop -autosub -sid 0 -sub-fuzziness 1 -vo yuv4mpeg:file=/home/ilya/video.y4m -ass -embeddedfonts -ass-line-spacing -3 -ass-font-scale 0.8 -ass-styles /home/ilya/Video/rutube/style/styles.ass -ass-force-style MarginV=3 -fontconfig -subfont-autoscale 3 -sws 9 -vf format=yv12,scale=960:540:::4:::1:1,expand=::::1:4/3 -noslices -subcp enca:ru:CP1251 -nosound "$g"
wait
rm *.log *.mbtree; done
Usually it works just fine but recently it created too slow video stream (the input file mplayer itself decodes with no problems). It is not x264 muxer bug (I've tested with x264 from git and ffms input - all was good, consequently not libavcodec bug). Below are examples (input and output files) - 7 seconds long.
http://uploadbox.com/files/3eaea6b9cd/
If there was any another way to burn subtitles into the video and get correct container (mencoder may create incorrect files) I would use another method but there isn't any.