Showing posts with label MKV. Show all posts
Showing posts with label MKV. Show all posts

Saturday, 2 April 2016

Ubuntu - merge Video files

The following applications can be used to concatenate video files.

Some ways to determine details of the media files :
ffprobe file.mp4
ffmpeg -i file.mp4

Extracting AC3 audio with FFMpeg

ffmpeg -i video.avi -acodec copy audio.ac3
or if there are multiple audio streams use the map to select the correct stream to extract

ffmpeg -i my_input_file.m4v -map 0:2 -c:a copy output_file.ac3 

MP4

sudo apt-get install gpac 
 MP4Box -add file1.mp4 -cat file2.mp4 NameofCombinedFile.mp4

Update:

And a way with ffmpeg (if all files are the same format):
ffmpeg -f concat -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy ../destination.mp4

Update2:

And to compress the mp4 afterwards for something like Youtube:
ffmpeg -i source.mp4 -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart target.mp4
Update 3: 

to add a audio channel to a video file:
MP4Box -new -add OriginalMovie.mp4 -add Track2.mp3#audio:delay=300 Output.mp4

MKV

sudo apt-get install mkvtoolnix

mkvmerge [global options] {-o out} [options1] {file1} [[options2] {file2}] [@optionsfile] 

AVI

sudo apt-get install transcode transcode-utils
avimerge -i part1.avi part2.avi -o joinedfile.avi

 




Tuesday, 28 February 2012

Streaming MKV from TwonkyMedia on ARM (QNAP QPKG) to Samsung TV

 



With the default configuration in TwonkyServer; streaming MKV content to a Samsung TV will not work as TwonkyServer detect the TV as a "Generic Media Receiver" and will give an on screen message "format not supported" as reported in various forums and blogs.

To fix this I did  the following:

Upgrade to latest TwonkyMedia 6 version (6.0.34) via QPKG

Let TwonkyServer build the database

Enable sharing for new media receivers automatically

Connect with your TV to TwonkyMedia

Under "TwonkyServer/Advanced Settings/Media Receivers"

locate the Samsung TV in the list from the MAC address or IP Address and change the device type from "Generic Media Receiver" to "Samsung TV"

retried playing MKV (720p) on the NAS to the Samsung TV via TwonkyServer worked as suspected now.

The next step would be to test it with various video- and sound formats as well as MKV containers with header compression.