These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

How to convert TS to MP4 - losslessly?

user-1493

I managed to download some BBC programmes from outside the UK using several free VPN connections.
It works, but has issues in the final conversion step from "ts" to "mp4" format.
Some were converted to mp4 without errors, most however result in errors ending up with only the "ts" file.
Now, "ts" files play fine with VLC, but I'd rather have the "mp4" container format as this can include metadata.
Is it possible to turn these "ts" manually and losslessly into "mp4"?

This is the command prompt dialogue I got from one such problematic download :

C:\Program Files\get_iplayer>perl.exe get_iplayer.pl "http://www.bbc.co.uk/iplayer/episode/b08445rk/dangerous-earth-4-aurora/"
get_iplayer 2.97-windows.0, Copyright (C) 2008-2010 Phil Lewis
  This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty.
  This is free software, and you are welcome to redistribute it under certain
  conditions; use --conditions for details.

INFO: Episode-only pid detected
INFO: Trying pid: b08445rk using type: tv
INFO Trying to stream pid using type tv
INFO: pid found in cache
Matches:
1049:   Dangerous Earth - Aurora, BBC Four, b08445rk

INFO: 1 Matching Programmes
INFO: Checking existence of original version
INFO: hvfvhigh1,hvfvhigh2,hlsvhigh1,hvfhigh1,hvfhigh2,hlshigh1,hvfstd1,hvfstd2,h
lsstd1,hvflow1,hvflow2 modes will be tried for version original
INFO: Trying hvfvhigh1 mode to record tv: Dangerous Earth - 4. Aurora
INFO: File name prefix = Dangerous_Earth_-_4._Aurora_b08445rk_original

INFO: Begin recording file: C:\Documents and Settings\USERNAME\Desktop\Dangerous_Earth_-_4._Aurora_b08445rk_original.partial.mp4.ts
INFO: Recorded: 361.41MB in 00:18:25 at  2679kbps to C:\Documents and Settings\USERNAME\Desktop\Dangerous_Earth_-_4._Aurora_b08445rk_original.partial.mp4.ts
INFO: Begin converting file: C:\Documents and Settings\USERNAME\Desktop\Dangerous_Earth_-_4._Aurora_b08445rk_original.partial.mp4.ts
[mp4 @ 02920060] pts (3600) < dts (7200) in stream 0
av_interleaved_write_frame(): Invalid argument
INFO: Command exit code 1 (raw code = 256)
WARNING: Conversion failed - retaining C:\Documents and Settings\USERNAME\Desktop\Dangerous_Earth_-_4._Aurora_b08445rk_original.partial.mp4.ts

user-2

That programme works fine in the UK. Since use of get_iplayer to download TV programmes from outside the UK is not supported and use of get_iplayer on Windows without the supplied batch files is also not supported, it is an unfortunate double-whammy for you, so I'll be closing this thread. There are many media converters you can use to repackage TS files as MP4. If you want to know how get_iplayer does it, use --verbose and it will print the ffmpeg command it uses to do the re-muxing.

These forums are archived

See this post for further info