mr_lou
5th May 2016, 08:14
I have perhaps a slightly unusual issue.
I'm recording videos from my Amstrad CPC464 computer, using an X-RGB Mini Framemeister and a Hauppauge HD PVR Rocket recorder. The end goal is to put these on a blu-ray disc. I'm using Ubuntu Linux for this.
The Amstrad CPC464 is an old 8-bit retro computer from 1984, and it's sending out a 51.43hz signal to the Framemeister.
The Framemeister receives this signal and converts it to a 720p@51.43fps stream which it then sends to the Hauppauge device.
The Hauppauge recorder then records fine - but the result is a 51.43fps video inside a 59.94fps container.
These recorded videos confuses both VLC and Kdenlive, showing a lot of jerkiness. Frames duplicated and some seemingly missing.
I can fix this by running a 2-pass x264 command, using two terminals.
Pass 1 in terminal 1:
mkfifo stream.y4m
mplayer -vo yuv4mpeg:file=stream.y4m -nosound recording.mp4
Pass 1 in terminal 2:
x264 --bitrate 13000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --fps 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o recording-fixed.264" stream.y4m
Pass 2 in terminal 1:
mkfifo stream.y4m
mplayer -vo yuv4mpeg:file=stream.y4m -nosound recording.mp4
Pass 2 in terminal 2:
x264 --bitrate 13000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --fps 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o recording-fixed.264 stream.y4m
(These commands should be down to blu-ray spec, except the --fps variable, producing a compliant blu-ray h264 video stream, at least if the source video were somewhat "normal". It still needs to be muxed with audio at this point, but this thread isn't about that part).
The resulting recording-fixed.264 file now plays great in a blu-ray player (after muxing with audio into a m2ts file). 50 fps without any duplicates and no frames missing either. Very nice smooth animation as it should be. But various tools seem to indicate that the video now resides inside a 100 fps container, and I'm afraid this might cause some trouble with certain blu-ray players.
So trying another approach I use the first method on this site, in order to convert the source into a 50 fps video in a 50 fps container:
http://www.hdslr-cinema.com/news/workflow/convert-between-framerates/
extract the frames as rawvideo
ffmpeg -i input.mov -f rawvideo -b 50000000 -pix_fmt yuv420p -vcodec rawvideo -s 1280x720 -y temp.raw
recreate the video with new framerate
ffmpeg -f rawvideo -b 50000000 -pix_fmt yuv420p -r 50 -s 1280x720 -i temp.raw -y output.mov
The result is indeed a 50 fps video inside a 50 fps container - but it seems to have taken all 59.94 fps from the source now rather than the actual 51.43 fps, resulting in a lot of duplicate frames and of course therefore a video that is far too slow.
So, now I have to ask here:
How would you go about converting such a weird 51.43 fps video in a 59.94 fps container into a straight 50fps video inside a 50fps container, keeping all 51.43 fps only slightly slower - i.e. no interpolation or tweening.
Thanks
I'm recording videos from my Amstrad CPC464 computer, using an X-RGB Mini Framemeister and a Hauppauge HD PVR Rocket recorder. The end goal is to put these on a blu-ray disc. I'm using Ubuntu Linux for this.
The Amstrad CPC464 is an old 8-bit retro computer from 1984, and it's sending out a 51.43hz signal to the Framemeister.
The Framemeister receives this signal and converts it to a 720p@51.43fps stream which it then sends to the Hauppauge device.
The Hauppauge recorder then records fine - but the result is a 51.43fps video inside a 59.94fps container.
These recorded videos confuses both VLC and Kdenlive, showing a lot of jerkiness. Frames duplicated and some seemingly missing.
I can fix this by running a 2-pass x264 command, using two terminals.
Pass 1 in terminal 1:
mkfifo stream.y4m
mplayer -vo yuv4mpeg:file=stream.y4m -nosound recording.mp4
Pass 1 in terminal 2:
x264 --bitrate 13000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --fps 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o recording-fixed.264" stream.y4m
Pass 2 in terminal 1:
mkfifo stream.y4m
mplayer -vo yuv4mpeg:file=stream.y4m -nosound recording.mp4
Pass 2 in terminal 2:
x264 --bitrate 13000 --preset veryslow --tune film --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 50 --fps 50 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o recording-fixed.264 stream.y4m
(These commands should be down to blu-ray spec, except the --fps variable, producing a compliant blu-ray h264 video stream, at least if the source video were somewhat "normal". It still needs to be muxed with audio at this point, but this thread isn't about that part).
The resulting recording-fixed.264 file now plays great in a blu-ray player (after muxing with audio into a m2ts file). 50 fps without any duplicates and no frames missing either. Very nice smooth animation as it should be. But various tools seem to indicate that the video now resides inside a 100 fps container, and I'm afraid this might cause some trouble with certain blu-ray players.
So trying another approach I use the first method on this site, in order to convert the source into a 50 fps video in a 50 fps container:
http://www.hdslr-cinema.com/news/workflow/convert-between-framerates/
extract the frames as rawvideo
ffmpeg -i input.mov -f rawvideo -b 50000000 -pix_fmt yuv420p -vcodec rawvideo -s 1280x720 -y temp.raw
recreate the video with new framerate
ffmpeg -f rawvideo -b 50000000 -pix_fmt yuv420p -r 50 -s 1280x720 -i temp.raw -y output.mov
The result is indeed a 50 fps video inside a 50 fps container - but it seems to have taken all 59.94 fps from the source now rather than the actual 51.43 fps, resulting in a lot of duplicate frames and of course therefore a video that is far too slow.
So, now I have to ask here:
How would you go about converting such a weird 51.43 fps video in a 59.94 fps container into a straight 50fps video inside a 50fps container, keeping all 51.43 fps only slightly slower - i.e. no interpolation or tweening.
Thanks